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

From: Paul Eggert <[email-masked]>
Date: Thu, 8 Jun 2017 13:35:45 -0700

On 06/08/2017 12:56 PM, Eli Zaretskii wrote:
> How do you know "\2205" is a two character string

Because I use Emacs out of the box, with the default printable-chars.

>
>> The difference is that I don't use display tables and don't want to use
>> them. In contrast, I would like to use hexadecimal display, if it worked
>> as well as octal does (which it does not).
> Then we need to code a separate feature in the Lisp reader, I think.

What do you think of using capital X for hexadecimal escapes with at 
most two digits? That way, "\X905" would be a two-character string, 
which is what is wanted here. Or we could use small h for hexadecimal, 
and "\h905".

If we were feeling ambitous and concise, we could use no character at 
all and upper-case hex digits for bytes in the range 0x80 through 0xFF; 
this would be unambiguous in strings (the example would be "\905"). This 
may be a bridge too far, though.