[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39689: 26.3; browse-url-mail not supporting RFC6068 (UTF-8-Based Per
bug#39689: 26.3; browse-url-mail not supporting RFC6068 (UTF-8-Based Percent-Encoding)
Thu, 27 Feb 2020 16:08:25 +0100
>>>>> On Thu, 27 Feb 2020 11:51:35 +0100, Robert Pluim <address@hidden> said:
>>>>> On Thu, 20 Feb 2020 14:48:54 +0100, Vegard Vesterheim via "Bug
Robert> reports for GNU Emacs, the Swiss army knife of text editors"
Robert> <address@hidden> said:
Vegard> Emacs does not seem to correctly handle UTF-8-Based
Vegard> illustrated in Chapter 6.2 from RFC6068.
Vegard> The command
Vegard> emacs -Q -l browse-url -eval '(browse-url-mail
Vegard> should result in a message buffer with the string "café" insterted
Vegard> body part of the message. Instead the string "cafÃ©" is inserted.
Robert> Yes, the assumption in rfc2368-unhexify-string is that percent
Robert> escaping is being done of ASCII characters.
Robert> epg--decode-percent-escape-as-utf-8 in epg.el does the
Robert> right thing, it could be renamed and moved. I think rfc2047 decoding
Robert> needs doing on the result as well. Lars, should I just stick these
Robert> rfc2368.el but named something like rfc6068-unhexify-string and
Robert> rfc6068-decode-2047-string or something?
Oh, and thereʼs another version in gnus-util, and one in url, and an
almost compatible one in org . The gnus and url ones suffer from
this same issue, although they both return different wrong results :-)
At least the epg, rfc2368, gnus, and the url versions look like they
can be unified. Not sure where to put them though.
 It supports % representation of the UTF-8 encoding of chars, but
also of the unicode code point of chars, so eg %E1 gets turned
into á. Iʼm sure thereʼs some historical reason for that.