[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: 27 Nov 2003 09:23:00 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>> I can't answer this question without knowing the answer to my question:
>> what is string-make-unibyte used for.

> It is used for converting a multibyte string to unibyte
> before it is inserted in a unibyte buffer.

I meant `what is "converting from multibyte to unibyte" used for'.
I.e. it can be used for different things in different contexts and I can't
answer in general, so I need a concrete case.

> It's an ambiguous statement.  Which are you sauing?

> Replace string-make-unibyte by:
> (1) encode-coding-string or make-string-unibyte.

> (2) a code that applies encode-coding-string or
> make-string-unibyte to the whole string depending on
> something (perhaps on the input string?).

> (3) a code that applies encode-coding-string to substrings
> where that is appropriate, and applies make-string-unibyte
> to the remaing substrings.

> (4) something that I still don't understand.

I'm saying that each *call* to string-make-unibyte can be replaced
by a call to either encode-coding-string or make-string-unibyte.

But the decision of which to use and which coding-system to use
depends on the context.

Now why would we want to do the work of changing all those calls?
Because all those that would use encode-coding-string are incorrect
in using string-make-unibyte because they won't do the right thing
in some language environments.


reply via email to

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