emacs-devel
[Top][All Lists]
Advanced

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

Re: Fcall_process: wrong conversion


From: Herbert Euler
Subject: Re: Fcall_process: wrong conversion
Date: Tue, 16 May 2006 13:40:31 +0800

From: Kenichi Handa <address@hidden>
To: "Herbert Euler" <address@hidden>
CC: address@hidden
Subject: Re: Fcall_process: wrong conversion
Date: Tue, 16 May 2006 13:39:54 +0900

In article <address@hidden>, "Herbert Euler" <address@hidden> writes:

> Oh, I see my fault.  At the same time, I see whether a string is
> unibyte-string is tested with STRING_MULTIBYTE (line 674 to 676,
> lisp.h):

>     /* Nonzero if STR is a multibyte string.  */
>     #define STRING_MULTIBYTE(STR)  \
>       (XSTRING (STR)->size_byte >= 0)

> I don't know how `size_byte' is set.  Is it done by scanning a string
> and watching the range of each byte (or some bytes) of the
> string?

No.  XSTRING (STR)->size_byte is set when a string is
created depending on how it is created (by
make_unibyte_string or make_multibyte_string or ...).

What is encoding arguments for?  For unifying character encodings?
I.e. if the file is in japanese-shift-jis, but command argument is in
chinese-gbk, encoding arguments will make sure all characters are in
japanese-shift-jis, won't it?

As you stated, there is no locale uses utf-16, so if utf-16 characters
appear as command arguments, we can't expect most programs will have
correct behaviors or at least the same behaviors as no utf-16
characters appear as command arguments, even if the commands are
invoked within, for instance, shell scripts.

So perhaps we should only prevent encoding arguments for utf-16?

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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