I'm trying to connect to a mud client, so I'm using usockets to connect over tcp. But After I write I get a decoding error reading. I have reason to believe the encoding should ascii ,or least use :clrf as the end of line designator, as on the lines I read there is a ^M before the end of line
(let* ((sock (socket-connect "angalon.net" 3011))
(stream (slot-value sock 'stream)))
(format stream "guest~%")
(force-output stream)
(dotimes (i 40)
(read-line stream))
stream)
:UTF-8 stream decoding error on
#<SB-SYS:FD-STREAM
for "socket 192.168.1.39:65516, peer: 93.174.104.58:3011"
{1004129903}>:
the octet sequence #(255 251 1 80) cannot be decoded.
[Condition of type SB-INT:STREAM-DECODING-ERROR]
I can verify the external format of the stream is indeed :utf-8, but the question is how I specify the external-format of the stream the socket gives me?
(let* ((sock (socket-connect "angalon.net" 3011))
(stream (slot-value sock 'stream)))
(stream-external-format stream))
;; => :UTF-8