[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Maybe bug with multibyte string and aset
From: |
pluskid |
Subject: |
Re: Maybe bug with multibyte string and aset |
Date: |
Thu, 12 Oct 2006 15:07:29 +0800 (CST) |
From: Kenichi Handa <address@hidden>
Subject: Re: Maybe bug with multibyte string and aset
Date: Thu, 12 Oct 2006 14:22:16 +0900
> 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
>
Thanks very much! It works! I'll send an email to the author of Mew to
describe this problem. Maybe they'll fix their code.
Thanks!