emacs-devel
[Top][All Lists]
Advanced

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

Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue


From: Eli Zaretskii
Subject: Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28]
Date: Tue, 21 Jan 2003 08:01:35 +0200 (IST)

On Mon, 20 Jan 2003, Stefan Monnier wrote:

> > unibyte sequence (hex): 81    81    C0    C0
> >                         result of conversion    display in multbyte buffer
> > string-as-multibyte:    9E A1 81    C0    C0    \201À\300
> > string-make-multibyte:  9E A1 9E A1 81 C0 81 C0 \201\201ÀÀ
> > string-to-multibyte:    9E A1 9E A1 C0    C0    \201\201\300\300
> [...]
> 3 - when called with a `raw-text' coding-system, decode-coding-string
>     returns a unibyte string

I might be missing something, but I think you are wrong: the sequence
"9E A1 9E A1 C0 C0" is _not_ a unibyte string.  For example, "9E A1" is 
the multibyte encoding of the 81 byte.

> I think avoiding string-FOO-multibyte and using decode-coding-string
> instead would make things a lot more clear.

FWIW, I never use string-*-multibyte because I could never remember what 
exactly does each variant do.




reply via email to

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