[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 14:58:32 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>     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.
> You seem to be thinking of reading files.  I'm talking about handling
> keyboard input.  If it was handled and accumulated as multibyte,
> but then you want to get the result that you'd have got if it had
> been inserted in a unibyte buffer, the existing string-make-unibyte
> seems to be the right thing to convert.

It's actually not the case.  If your keyboard is using say utf-8 encoding
and you realize "oh wait I wanted it in unibyte", the string-make-unibyte
will not get you back the unibyte sequence: you'd need to
encode-coding-string instead.


reply via email to

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