From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Fcall_process: wrong conversion Date: Tue, 16 May 2006 13:10:30 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1147752656 30261 80.91.229.2 (16 May 2006 04:10:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 May 2006 04:10:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 16 06:10:53 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 1FfqtW-0005yN-0b for ged-emacs-devel@m.gmane.org; Tue, 16 May 2006 06:10:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfqtV-0002BT-7M for ged-emacs-devel@m.gmane.org; Tue, 16 May 2006 00:10:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfqtJ-00029S-3z for emacs-devel@gnu.org; Tue, 16 May 2006 00:10:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfqtI-00027m-0r for emacs-devel@gnu.org; Tue, 16 May 2006 00:10:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfqtH-00027i-RI for emacs-devel@gnu.org; Tue, 16 May 2006 00:10:35 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Ffqvq-0003Df-6n for emacs-devel@gnu.org; Tue, 16 May 2006 00:13:14 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4G4AVc7012495; Tue, 16 May 2006 13:10:31 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k4G4AVe9008653; Tue, 16 May 2006 13:10:31 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1FfqtC-0006oD-00; Tue, 16 May 2006 13:10:30 +0900 Original-To: "Herbert Euler" In-reply-to: (herberteuler@hotmail.com) 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) 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:54549 Archived-At: In article , "Herbert Euler" writes: > `CODING_REQUIRE_ENCODING' test the following things (line 491 to 496, > coding.h): > /* Return 1 if the coding context CODING requires code conversion on > encoding. */ > #define CODING_REQUIRE_ENCODING(coding) \ > ((coding)->src_multibyte \ > || (coding)->common_flags & CODING_REQUIRE_ENCODING_MASK \ > || (coding)->mode & CODING_MODE_SELECTIVE_DISPLAY) That is to make it possible to do encoding of unibyte string/buffer generated by string-as-unibyte or (set-buffer-multibyte nil) from multibyte string/buffer. Perhaps we should not allow such an operation, but as this feature is there for long, it seems dangerous to change it now. How about disabling encoding only for process arguments if they are already unibyte? I think such a change is very safe. > And there is another problem: if `locale-coding-system' is UTF-16, is > it correct to add prefix "\377\376" or "\376\377" to every command > argument? If not, the current code of `call-process' is wrong, since > it will always add the prefix. I think there's no locale that uses utf-16, and it's impossible to support such a locale because most of basic libc functions that accept a filename require that it is terminated by NULL. --- Kenichi Handa handa@m17n.org