emacs-devel
[Top][All Lists]
Advanced

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

> We need string-make-unibyte as long as we have unibyte mode.  The idea is
> that if a string holds text that was read in as multibyte and should have
> been read in as unibyte, you can convert what you did get into what you
> would have got.

But the question is then: what does it mean to read a text as multibyte?
The input we get is normaly a stream of bytes and we need to decode it
into a stream of (multibyte) chars using a coding-system.  We can also
keep the bytes as the are but place them in a multibyte string, using
eight-bit-control and eight-bit-graphic.

Undoing in the second case is done using the function make-string-unibyte
I'm advocating.
Undoing in the first case can be done by re-encoding with the same
coding-system or by re-reading.  Calling string-make-unibyte will not
undo things properly in general (it will only work right in the
cases where the coding-system in use is 8-bit).

So which scenario am I forgetting ?


        Stefan




reply via email to

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