[Top][All Lists]

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

Re: eight-bit char handling in emacs-unicode

From: Stefan Monnier
Subject: Re: eight-bit char handling in emacs-unicode
Date: 02 Dec 2003 11:06:30 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> So we should at least signal an error if the conversion is
>> unsafe (in that make-string-multibyte will not recover the
>> original string).

> Shall we test it with HEAD to check how often such an error
> occurs?

That would be great.

>> BTW, in which kind of circumstances is the user presented with both
>> a multibyte buffer and a unibyte buffer ?

> Even if one starts Emacs with --unibyte, emacs sometimes
> make a multibyte buffer (e.g. C-h h).

I guess in a unibyte session, it makes sense, because in such a case,
unibyte buffers do contain characters and the user explicitly tells us
"don't bother me about multiple charsets, just pretend all fits within

> And, even if one starts Emacs with --multibyte, he may have a file that
> contains, for instance, latin-1 characters and raw-byte data, and he may
> want to read such a file with the coding system raw-text (then C-x =
> always shows \000..\377).

Is such a buffer necessarily unibyte ?  Why not multibyte ?
Or is it for performance reasons ?
And what should happen if we paste text containing 8859-5 ou BIG5
text in such a buffer ?

> The fact that something doesn't work for double-byte charset
> users can't be a reason strong enough for dropping it for
> single-byte charset users.

Agreed.  But we should encourage people to "do it right" by calling
the appropriate encoding/decoding functions so it works for all cases.
I believe that a good way to encourage people is by discouraging the use of
string-make-unibyte (and other ways to use copy_text similarly).


reply via email to

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