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

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

bug#7517: 24.0.50; repeated crash under Mac OS X


From: Stefan Monnier
Subject: bug#7517: 24.0.50; repeated crash under Mac OS X
Date: Fri, 31 Dec 2010 18:07:22 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

>>> Emacs should never use unibyte strings for buffer names.
>> I don't think we make any effort to prevent this from happening.
>> And I'm not completely sure that it would be worth the trouble either:
>> I suspect that wherever a unibyte buffer-name would cause problem
>> (mode-line, window title, younameit), some other unibyte string could
>> appear from elsewhere just as well, so enforcing multibyte buffer-names
>> wouldn't close the vulnerabilities.

> If we don't at least ENCODE_UTF_8 should do the right thing.  Is the coding
> for these kind of strings known?  If not and we don't enforce encoding in
> basic interfaces, we must deal with all existing encodings?

I'd tend to agree.  ENCODE_UTF_8 is used for things where we *really*
want the output to be proper utf-8, so any char outside of utf-8
(e.g. an eight-bit char) should result in something else than a raw byte
in the output.  This is contrary to what we do for utf-8 files, where we
output eight-bit chars as raw bytes (because any sequence of bytes
that's not valid utf-8 in the input leads to such eight-bit chars in
the buffer, so outputting them as raw bytes is used to preserve the
file unchanged when saved).


        Stefan





reply via email to

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