emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Maybe bug with multibyte string and aset


From: Kenichi Handa
Subject: Re: Maybe bug with multibyte string and aset
Date: Thu, 12 Oct 2006 14:22:16 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, pluskid <address@hidden> writes:

> Then, try the following code

> (let ((foo "foobar"))
>   (aset foo 0 ?\!!)) ; note the `!!' means the Chinese character I
>                      ; mentioned above

> evaluate this expression , I get an error:

> Debugger entered--Lisp error: (args-out-of-range "foobar" 25105)
>   aset("foobar" 0 25105)

In emacs-unicode-2, I changed `aset' as an experiment so
that storing a multibyte character in a unibyte string
causes that error.  This is mainly to avoid unexpected
unibyte->multibyte conversion of a string.

< (let ((foo (string-to-multibyte "foobar")))
<   (aset foo 0 ?\!!)) ; note the `!!' means the Chinese character I

should work.

---
Kenichi Handa
address@hidden




reply via email to

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