[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (format "%c" ... ) sometimes returns multibyte chars when unibyte ex
From: |
Kenichi Handa |
Subject: |
Re: (format "%c" ... ) sometimes returns multibyte chars when unibyte expected (?) |
Date: |
Mon, 23 Aug 2004 21:57:14 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Nils Klarlund <address@hidden> writes:
> Thanks for the clarification. This convention about 0 must be recent I
> guess. In Emacs 21.3
> "GNU Emacs 21.3.1 (i386-mingw-nt5.1.2600) of 2004-03-10 on NYAUMO"
> (aref (format "%c%c" 0 169) 1)
> does in fact evaluate to 169.
That's because the function format didn't perform
unibyte->multibyte conversion which usually happens in other
cases where unibyte thing and multibyte thing are
concatinated. For instance, (aref (format "%c%c" ?À 169) 1)
also returned 169 but (aref (concat (format "%c" ?À) (format
"%c" 169)) 1) returned 2217 (== ?©).
We decided that it was a bug and fixed format in the latest
version, which resulted in revealing the 0 problem.
---
Ken'ichi HANDA
address@hidden