From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion) Date: Fri, 23 Jul 2010 13:21:42 +0300 Message-ID: <831vauv6q1.fsf@gnu.org> References: <4C483A30.9010804@gmail.com> <83lj93cn42.fsf@gnu.org> <4C48B11D.4050202@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1279881596 29474 80.91.229.12 (23 Jul 2010 10:39:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Jul 2010 10:39:56 +0000 (UTC) Cc: 6705@debbugs.gnu.org To: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 23 12:39:55 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OcFfW-0002o7-IF for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 12:39:55 +0200 Original-Received: from localhost ([127.0.0.1]:56426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcFe7-0002eD-0R for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 06:38:27 -0400 Original-Received: from [140.186.70.92] (port=47296 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcFdW-0002ES-C0 for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 06:37:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcFd7-0002Hl-E8 for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 06:37:26 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56706) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcFd7-0002Hf-9n for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 06:37:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OcFPC-0001g9-5f; Fri, 23 Jul 2010 06:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2010 10:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6705 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6705-submit@debbugs.gnu.org id=B6705.12798805716445 (code B ref 6705); Fri, 23 Jul 2010 10:23:02 +0000 Original-Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 10:22:51 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcFP0-0001fu-9u for submit@debbugs.gnu.org; Fri, 23 Jul 2010 06:22:50 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcFOx-0001fo-52 for 6705@debbugs.gnu.org; Fri, 23 Jul 2010 06:22:48 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6000D009C88J00@a-mtaout22.012.net.il> for 6705@debbugs.gnu.org; Fri, 23 Jul 2010 13:21:42 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6000C4PA45ZQ20@a-mtaout22.012.net.il>; Fri, 23 Jul 2010 13:21:42 +0300 (IDT) In-reply-to: <4C48B11D.4050202@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 23 Jul 2010 06:23:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38813 Archived-At: > Date: Thu, 22 Jul 2010 23:59:09 +0300 > From: Laimonas V=C4=97bra > CC: 6705@debbugs.gnu.org >=20 > Eli Zaretskii wrote: >=20 > > Sorry, I cannot understand your comments. You talk about corrupt= ed > > conversion, but never add any detailed explanations, just example= s. > > Could you please elaborate? >=20 > That was supposed to be detailed explanations through the detailed= =20 > examples. It is the way it happens. I did check/investigate; I don't doubt that you checked, I just don't understand the description of the problem. Once again, if all you want to say is that you want to invoke externa= l programs with command-line arguments encoded in anything other than the current locale's encoding, then this will not currently work in the native Windows build. But if you are trying to say anything else= , please elaborate. > args that=20 > comes from Emacs (w32proc.c) #1, which are passed to cmdproxy #2 an= d --=20 > after all -- what subprocess/app receives #3. Have you read that= =20 > explanation? Yes. > What part of the explanation of the corrupted conversion is unclear None of it. Perhaps instead of going by example, just describe what encoding you used, in what Emacs command, and what was corrupted as result. > > . since Cygwin 1.7 switched to using UTF-8, it parted itself e= ven > > further from native Windows applications, so you now have on= e more > > reason to use the Cygwin build of Emacs instead of the nativ= e one >=20 > Well ok, but it (cygwin) work pretty well under/with utf-16 API lay= er... I didn't try to imply that Cygwin was the problem. I was suggesting to use the Cygwin build of Emacs. Why do you insist on using the native w32 build, when it is obvious that the compatibility between what it does and what Cygwin expects is marginal at best? > In the context of external communication with cygwin -- it doesn't = need=20 > to use (everywhere), but it needs to convert its output to utf-16= =20 > explicitly and call CreateProcessW(). Yes. But it doesn't make sense to do this kind of surgery in Emacs without benefiting from the *W APIs all over, does it?