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: Eli Zaretskii
Subject: bug#17758: 24.3; The line isn't wrapped during printing if it contains non ascii chars
Date: Sat, 29 May 2021 10:01:43 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Kenichi Handa <handa@gnu.org>,  tobias.bora@gmail.com,
>   17758@debbugs.gnu.org
> Date: Sat, 29 May 2021 08:41:38 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I'm not sure I understand the fix, can you explain it?
> 
> I'm not sure I understand it either.  :-/
> 
> (string-match "^[\000-ÿ]+" "éfoo")
> => 0
> 
> (string-match "^[\000-\377]+" "éfoo")
> => nil
> 
> Which surprised me.

Maybe because an octal escape causes us to match only raw bytes?

(string-match "^[\000-\377]+" (encode-coding-string "éfoo" 'latin-1))
=> 0

Is that documented somewhere?





reply via email to

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