Subject: Re: bug#24117: 25.1; url-http-create-request: Multibyte text in HTTP request

From: Katsumi Yamaoka <[email-masked]>
Date: Tue, 09 Aug 2016 08:48:44 +0900

On Mon, 08 Aug 2016 09:32:44 -0400, Ted Zlatanov wrote:
> CC-ed Katsumi Yamaoka since he may have some feedback as well.

Well, I'm not familiar with url-*.el but there seems to be no
function to encode a url containing non-ASCII characters such as:
"http://банки.рф/"
In emacs-w3m[1] there are some encoder functions:

;; An encoder used for a full url string:
(w3m-url-transfer-encode-string "http://банки.рф/")
 => "http://xn--80abwho.xn--p1ai/"

;; An encoder used for a string that is a part of url:
(concat "https://ja.wikipedia.org/wiki/"
	(w3m-url-encode-string "日本語ドメイン名"))
 => "https://ja.wikipedia.org/wiki/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%89%E3%83%A1%E3%82%A4%E3%83%B3%E5%90%8D"

Those two encoded urls will work.

[1]
,----
| % cvs -d :pserver:[email-masked]:/storage/cvsroot login
| CVS password: # No password is set.  Just hit Enter/Return key.
| % cvs -d :pserver:[email-masked]:/storage/cvsroot co emacs-w3m
`----