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: Stefan Monnier
Subject: Re: [Unicode-2] `read' always returns multibyte symbol
Date: Tue, 13 Nov 2007 10:07:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> --8<---------------cut here---------------start------------->8---
> (let ((string (encode-coding-string "local.ใƒ†ใ‚นใƒˆ" 'utf-8)))
>   (with-temp-buffer
>     (set-buffer-multibyte t)
>     (insert (string-to-multibyte string))
>     (goto-char (point-min))
>     (multibyte-string-p (symbol-name (read (current-buffer))))))
> --8<---------------cut here---------------end--------------->8---

I'm not sure what Emacs should do in such a case, but in the example
above, using a multibyte buffer is asking for trouble.
Can't Gnus use a unibyte buffer in its corresponding code?  That would
speed things up, save you the use of string-to-multibyte, and make it
crystal clear that the result should be unibyte.


        Stefan "trying hard not to say that the use of a multibyte
                buffer here is a plain bug ;-)"




reply via email to

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