GNU bug report logs -
#36098
26.1; Incorrect epg--decode-percent-escape
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36098 in the body.
You can then email your comments to 36098 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 13:50:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 05 Jun 2019 13:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The code
(decode-coding-string
(epg--decode-percent-escape "D%C3%A9partement")
'utf-8)
should return "Département" but does not because the decoding of the percent string is done with multibyte.
The attached patch fixes this.
Best,
C.
[0001-epg-Use-unibyte-string-to-decode-percent-escape.patch (text/x-diff, attachment)]
[ATT00001.txt (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 14:50:05 GMT)
Full text and
rfc822 format available.
Message #8 received at 36098 <at> debbugs.gnu.org (full text, mbox):
> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
> Date: Wed, 5 Jun 2019 13:49:05 +0000
>
> The code
>
> (decode-coding-string
> (epg--decode-percent-escape "D%C3%A9partement")
> 'utf-8)
>
> should return "Département" but does not because the decoding of the percent string is done with multibyte.
>
> The attached patch fixes this.
Isn't the problem inside epg--decode-percent-escape? I think it
should be fixed there, it shouldn't produce a multibyte string.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 15:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 36098 <at> debbugs.gnu.org (full text, mbox):
On 5 June 2019 at 16:49 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Isn't the problem inside epg--decode-percent-escape? I think it
> should be fixed there, it shouldn't produce a multibyte string.
That's what the patch does.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 16:59:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 36098 <at> debbugs.gnu.org (full text, mbox):
> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
> Disposition-Notification-To: Christophe TROESTLER
> <Christophe.TROESTLER <at> umons.ac.be>
> Date: Wed, 5 Jun 2019 15:53:23 +0000
>
> > Isn't the problem inside epg--decode-percent-escape? I think it
> > should be fixed there, it shouldn't produce a multibyte string.
>
> That's what the patch does.
But you also moved decode-coding-string into that function; is that
correct? Are we sure the original string was necessarily encoded in
UTF-8?
What I mean was only to let that function return a unibyte string, and
let the caller perform coding conversions.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 17:06:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 36098 <at> debbugs.gnu.org (full text, mbox):
On 5 June 2019 at 18:57 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
>> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
>> Disposition-Notification-To: Christophe TROESTLER
>> <Christophe.TROESTLER <at> umons.ac.be>
>> Date: Wed, 5 Jun 2019 15:53:23 +0000
>>
>> > Isn't the problem inside epg--decode-percent-escape? I think it
>> > should be fixed there, it shouldn't produce a multibyte string.
>>
>> That's what the patch does.
>
> But you also moved decode-coding-string into that function; is that
> correct? Are we sure the original string was necessarily encoded in
> UTF-8?
This is because this is an internal function and is always called with the same conversion.
> What I mean was only to let that function return a unibyte string, and
> let the caller perform coding conversions.
I can do that. To avoid repetitions, what about introducing epg--decode-percent-escape-as-utf-8?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 17:30:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 36098 <at> debbugs.gnu.org (full text, mbox):
> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
> Date: Wed, 5 Jun 2019 17:05:45 +0000
>
> > What I mean was only to let that function return a unibyte string, and
> > let the caller perform coding conversions.
>
> I can do that. To avoid repetitions, what about introducing epg--decode-percent-escape-as-utf-8?
I think that would be fine, yes.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#36098
; Package
emacs
.
(Wed, 05 Jun 2019 18:13:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 36098 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 5 June 2019 at 19:29 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
>> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
>> Date: Wed, 5 Jun 2019 17:05:45 +0000
>>
>> > What I mean was only to let that function return a unibyte string, and
>> > let the caller perform coding conversions.
>>
>> I can do that. To avoid repetitions, what about introducing epg--decode-percent-escape-as-utf-8?
>
> I think that would be fine, yes.
Updated patch doing that.
[0001-epg-Use-unibyte-string-to-decode-percent-escape.patch (text/x-diff, attachment)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 22 Jun 2019 09:27:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
:
bug acknowledged by developer.
(Sat, 22 Jun 2019 09:27:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 36098-done <at> debbugs.gnu.org (full text, mbox):
> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
> Date: Wed, 5 Jun 2019 18:12:06 +0000
>
> On 5 June 2019 at 19:29 CEST, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >> From: Christophe TROESTLER <Christophe.TROESTLER <at> umons.ac.be>
> >> CC: "36098 <at> debbugs.gnu.org" <36098 <at> debbugs.gnu.org>
> >> Date: Wed, 5 Jun 2019 17:05:45 +0000
> >>
> >> > What I mean was only to let that function return a unibyte string, and
> >> > let the caller perform coding conversions.
> >>
> >> I can do that. To avoid repetitions, what about introducing epg--decode-percent-escape-as-utf-8?
> >
> > I think that would be fine, yes.
>
> Updated patch doing that.
Thanks, pushed.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 20 Jul 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.