emacs-devel
[Top][All Lists]
Advanced

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

Re: [Unicode-2] `read' always returns multibyte symbol


From: Kenichi Handa
Subject: Re: [Unicode-2] `read' always returns multibyte symbol
Date: Fri, 16 Nov 2007 09:51:23 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

In article <address@hidden>, Katsumi Yamaoka <address@hidden> writes:

> Oops.  I misunderstood that the reason why Emacs 22 and 23 don't
> break 8-bit data while they are being fed into a multibyte buffer
> from a network process of which the process coding system is
> binary.  So, maybe the best ways for the present are still to
> use a unibyte buffer for unibyte data and to use a multibyte
> buffer for multibyte data.  And use a string, not a buffer, to
> encode and decode data if the multibyteness of data will change,
> like:

> (insert (prog1
>           (decode-coding-string (buffer-string) 'coding)
>         (erase-buffer)
>         (set-buffer-multibyte t)))

The best is to decide buffer's multibyteness just after it
is created, and don't change the multibyteness later.

---
Kenichi Handa
address@hidden




reply via email to

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