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

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

bug#24206: 25.1; Curly quotes generate invalid strings, leading to a seg


From: Eli Zaretskii
Subject: bug#24206: 25.1; Curly quotes generate invalid strings, leading to a segfault
Date: Mon, 15 Aug 2016 22:04:18 +0300

> Cc: address@hidden, address@hidden, address@hidden,
>  address@hidden
> From: Paul Eggert <address@hidden>
> Date: Mon, 15 Aug 2016 11:43:16 -0700
> 
> Yes. This is in the Elisp manual, which says "We recommend that
> you never use unibyte buffers and strings except for manipulating
> encoded text or binary non-text data."

That advice is for Lisp programmers, so it's only tangentially
relevant in this case.

> Eli Zaretskii wrote:
> > as the original string is
> > unibyte, the output of "\200≠", which is multibyte, might not be what
> > the users expect.  They might expect "\200\342\211\240" instead.
> 
> No, as per Andreas's comment and the Elisp reference manual, users should not 
> expect substitute-command-keys to do that.

We still want them to be as little surprised as possible, do we?

> As long as it doesn't crash on non-ASCII unibyte data we needn't
> sweat the details about whether it returns unibyte or multibyte
> strings for such data.

I explained why this cannot be 100% true.  So I'd like to avoid
converting unibyte strings to multibyte as much as reasonably
possible.





reply via email to

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