Eli Zaretskii writes: > The problem is with how the original request is generated, not how it > is encoded. Sorry, right. That's what I should have said. And explicitly applying an encoding to finagle the wrong characters into the right bytes is not the way to go, I now realize. > So what is the problem with using unibyte-string for producing a > unibyte string from a list of bytes? It sounds like it's exactly what > is needed here, and is actually used in some places in socks.el. Ah, that's the ticket. Thanks. I've also moved the conversion business out of socks-send-command and into its caller where it's hopefully a better fit.