bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27270: display-raw-bytes-as-hex generates ambiguous output for Emacs


From: Paul Eggert
Subject: bug#27270: display-raw-bytes-as-hex generates ambiguous output for Emacs strings
Date: Sun, 24 Apr 2022 00:10:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

On 4/23/22 07:00, Lars Ingebrigtsen wrote:
we've had this format for half a decade now, and this doesn't
really seem to be a problem in practice

Not surprising, since most people don't set display-raw-bytes-as-hex. But that doesn't mean it's not a problem. Quoting bugs can be issues even if they're unlikely to occur at random. (Think SQL injection. :-)


I tend to think that introducing a new syntax just to fix it
isn't worth it.

That's fine, so let's fix the problem as originally suggested. That is, display the string returned by (format "%c%c" #x9e #x66) as "\x9e\x66" (equivalent to (concat "\x9e" "\x66") which is correct) instead of as "\x9ef" (equivalent to "\N{BENGALI DIGIT NINE}" which is wrong).

This fixes the problem and doesn't introduce new syntax.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]