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: Miles Bader
Subject: Re: unibyte<->multibyte conversion [Re: Emacs-diffs Digest, Vol 2, Issue 28]
Date: Tue, 21 Jan 2003 10:02:30 -0500
User-agent: Mutt/1.3.28i

On Tue, Jan 21, 2003 at 05:04:37PM +0900, Kenichi Handa wrote:
> And, if one wants to insert a result of encode-coding-string
> in a multibyte buffer (perhaps for some post-processing),
> what he should do?  If we have string-to-multibyte, we can
> do this:
>    (insert (string-to-multibyte
>              (encode-coding-string MULTIBYTE-STRING CODING)))
> If we don't have it, and provided that decode-coding-string
> always returns a multibyte string, we must do:
>    (insert (decode-coding-string
>              (encode-coding-string MULTIBYTE-STRING CODING) 'raw-text-unix))
> Isn't it very funny?

Actually I find the second variant much _more_ clear, as it makes it very
obvious what's happening.

-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'




reply via email to

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