GNU bug report logs - #46342
28.0.50; socks-send-command munges IP address bytes to UTF-8

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Sat, 6 Feb 2021 11:47:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 46342 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 46342 <at> debbugs.gnu.org
Subject: Re: bug#46342: 28.0.50; socks-send-command munges IP address bytes
 to UTF-8
Date: Sat, 06 Feb 2021 17:15:50 +0200
> From: "J.P." <jp <at> neverwas.me>
> Cc: 46342 <at> debbugs.gnu.org
> Date: Sat, 06 Feb 2021 06:19:55 -0800
> 
> Re appropriate encoding: correct me if I'm wrong (internet), but among
> the Emacs coding systems, it'd be latin-1.

That depends on what the other end expects.  Does it expect latin-1 in
this case?

> In the proposed patch for socks-send-command, swapping out the call
> to unibyte-string with (encode-coding-string address 'latin-1) has
> the same effect of preserving, say, char 216 as the single byte
> "\330" and not "\303\230".

Does emitting the single byte \330 produce the correct result in this
case?  Then by all means please use

   (encode-coding-string address 'latin-1)

> Re program on the other end: this would be any program offering a proxy
> service that speaks the same protocol. Popular ones include tor and ssh.
> There's also a "bind" command that allows your client (Emacs) to act as
> a server and listen/accept connections on the remote end as if they were
> present on your local network.

And those expect Latin-1 encoding in this case?




This bug report was last modified 4 years and 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.