[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5700: [bug-gnu-emacs] emacs-23 and 8-bit characters in 128..255
From: |
npostavs |
Subject: |
bug#5700: [bug-gnu-emacs] emacs-23 and 8-bit characters in 128..255 |
Date: |
Wed, 06 Jul 2016 19:52:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) |
tags 5700 notabug
quit
With Emacs 24/25, using "\u00FF" works:
(string-equal (buffer-substring (point) (1+ (point))) "\u00FF")
(looking-at "\u00FF")
Seems to be another instance of the unibyte vs multibyte string escape syntax
thing:
You can also use hexadecimal escape sequences (ā\xNā) and octal
escape sequences (ā\Nā) in string constants. *But beware:* If a
string constant contains hexadecimal or octal escape sequences, and
these escape sequences all specify unibyte characters (i.e., less
than 256), and there are no other literal non-ASCII characters or
Unicode-style escape sequences in the string, then Emacs
automatically assumes that it is a unibyte string. That is to say,
it assumes that all non-ASCII characters occurring in the string are
8-bit raw bytes.
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> which seems acceptable, whereas under Emacs-23 we have:
>
[...]
> (multibyte-string-p "\377") prints as "\377"
In 23.4 it returns returns nil
- bug#5700: [bug-gnu-emacs] emacs-23 and 8-bit characters in 128..255,
npostavs <=