GNU bug report logs -
#27270
display-raw-bytes-as-hex generates ambiguous output for Emacs strings
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Wed, 7 Jun 2017 03:59:01 UTC
Severity: wishlist
Tags: moreinfo
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #43 received at 27270 <at> debbugs.gnu.org (full text, mbox):
> Cc: npostavs <at> users.sourceforge.net, 27270 <at> debbugs.gnu.org,
> v.schneidermann <at> gmail.com
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> 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.
This bug report was last modified 3 years and 109 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.