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: Kenichi Handa
Subject: Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28]
Date: Tue, 21 Jan 2003 09:10:07 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, "Eli Zaretskii" <address@hidden> writes:
>>  On process reading, if raw-text is used, the process output
>>  is at first read as a unibyte string, the string is coverted
>>  to multibyte by string-as-mulitbyte (not by not-yet-existing
>>  string-to-multibyte), then inserted in a multibyte buffer.

> Sorry, I don't think I understand the difference.  What will we have
> in the buffer after process output is converted as you describe in the
> last paragraph above?

Ok, here's an example (Latin-1 lang. env.).

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

(1) Reading a process output by raw-text into a multibyte
buffer does AS conversion.  I think this should do TO
conversion to be consistent with (3).

(2) Reading a file by raw-text (resulting in a unibyte
buffer) and copying the contents into a multibyte buffer
does MAKE conversion.  This is Emacs' default
unibyte->multibyte conversion.

(3) Inserting a file by raw-text in a multibyte buffer does
TO conversion.

---
Ken'ichi HANDA
address@hidden




reply via email to

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