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

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

bug#17758: 24.3; The line isn't wrapped during printing if it contains n


From: Mattias Engdegård
Subject: bug#17758: 24.3; The line isn't wrapped during printing if it contains non ascii chars
Date: Sat, 29 May 2021 10:09:27 +0200

> (string-match "^[\000-ÿ]+" "éfoo")
> => 0
> 
> (string-match "^[\000-\377]+" "éfoo")
> => nil

Yes, this is by design. The former is the range U+0000..U+00FF and covers 
Latin-1. The latter covers ASCII and raw bytes, but no non-ASCII Unicode 
characters.

It is what we get when one interval endpoint is ASCII and the other a raw byte; 
it is mainly intended for regexp matching in unibyte text. Since the Emacs 
multibyte encoding puts the raw bytes 80..FF at the very end of the character 
numbering, [\000-\377] would include every Unicode character (which would be 
very surprising) if we didn't have this mechanism.






reply via email to

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