Just by looking at the source for Clozure CL, the external format is hardcoded to ccl:*default-external-format* , which is UTF-8 on my system. The SBCL backend does not specify an external format, but it probably creates a socket with the default SBCL, which again is UTF-8. I donβt think there is a portable way to change the external format without modifying usocket.
However, you can associate sb-impl::*default-external-format* with the text :latin-1 before calling socket-connect :
(let* ((sb-impl::*default-external-format* :latin-1) (sock (socket-connect "angalon.net" 3011)) (stream (slot-value sock 'stream))) (stream-external-format stream)) ;; :LATIN-1
Edit: Also see FLEXI-STREAMS . I have not tested it, but you can convert the stream to FLEXI-STREAM and specify the external format.
source share