GNU bug report logs -
#24117
25.1; url-http-create-request: Multibyte text in HTTP request
Previous Next
Reported by: Sho Takemori <stakemorii <at> gmail.com>
Date: Sun, 31 Jul 2016 08:28:02 UTC
Severity: normal
Found in version 25.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 08/08/2016 11:36 PM, Lars Ingebrigtsen wrote:
>>> (url-encode-url "http://góogle.com/fóo")
>>> => "http://góogle.com/f%C3%B3o"
>>
>> That is true in master, but not in emacs-25, AFAICS.
>>
>> (Is that related to your work on punycode?)
>
> Might be; I can't recall, though.
Here's another question: why does url-encode-url pass the argument
through encode-coding-string before passing it to url-generic-parse-url,
if the latter is expected to be able to deal with non-ASCII characters?
The only recent change in that function is your commit 8b61c22e dated
last December, which very much looks like a band-aid in this context.
>> On emacs-25, it returns "http://g%C3%B3ogle.com/f%C3%B3o".
>
> Which is, of course, completely wrong.
I see.
Since you're better versed in this area than me, can you propose a
specific fix for the currently discussed bug? It is more serious than
not being able to use unicode in URLs.
On master, the domain part, which is untouched by url-encode-url, is
converted to an ASCII unibyte string with puny-encode-domain, inside
url-http-create-request. But real-fname remains a multibyte string,
triggering the problem anyway.
This bug report was last modified 8 years and 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.