From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: Fcall_process: wrong conversion Date: Tue, 16 May 2006 13:40:31 +0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1147758141 9856 80.91.229.2 (16 May 2006 05:42:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 May 2006 05:42:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 16 07:42:20 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FfsK3-0007VC-3W for ged-emacs-devel@m.gmane.org; Tue, 16 May 2006 07:42:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfsK2-0006zt-EE for ged-emacs-devel@m.gmane.org; Tue, 16 May 2006 01:42:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfsIS-00060d-Td for emacs-devel@gnu.org; Tue, 16 May 2006 01:40:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfsIP-0005xR-Q0 for emacs-devel@gnu.org; Tue, 16 May 2006 01:40:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfsIP-0005xD-F2 for emacs-devel@gnu.org; Tue, 16 May 2006 01:40:37 -0400 Original-Received: from [64.4.26.42] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfsKy-0001FY-QE for emacs-devel@gnu.org; Tue, 16 May 2006 01:43:16 -0400 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 15 May 2006 22:40:35 -0700 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Tue, 16 May 2006 05:40:31 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: Original-To: handa@m17n.org X-OriginalArrivalTime: 16 May 2006 05:40:35.0756 (UTC) FILETIME=[415666C0:01C678AB] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54557 Archived-At: >From: Kenichi Handa >To: "Herbert Euler" >CC: emacs-devel@gnu.org >Subject: Re: Fcall_process: wrong conversion >Date: Tue, 16 May 2006 13:39:54 +0900 > >In article , "Herbert Euler" > 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/