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: Eli Zaretskii
Subject: bug#27270: display-raw-bytes-as-hex generates ambiguous output for Emacs strings
Date: Fri, 09 Jun 2017 09:00:26 +0300

> Cc: address@hidden, address@hidden,
>  address@hidden
> From: Paul Eggert <address@hidden>
> 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.

That's just sheer luck, then, not a general solution that works for
everybody.  And it's not unimaginable that we will mark more
codepoints printable at some point, given some development in the
Unicode standard or in Emacs.

> >> 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".

I'm okay, but I'm not sure I understand how does this fix your
problem.  Can you explain?

> 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.

Too far, I agree.





reply via email to

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