GNU bug report logs - #6705
w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Laimonas Vėbra <laimonas.vebra@HIDDEN>; merged with #6546; dated Thu, 22 Jul 2010 12:32:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 25 Jul 2010 23:38:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 19:38:52 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OdAmR-0004dy-Q5
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2010 19:38:51 -0400
Received: from pruche.dit.umontreal.ca ([132.204.246.22])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1OdAmQ-0004dr-Gt
	for 6705 <at> debbugs.gnu.org; Sun, 25 Jul 2010 19:38:51 -0400
Received: from ceviche.home (vpn-132-204-232-49.acd.umontreal.ca
	[132.204.232.49])
	by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o6PNck5m030869;
	Sun, 25 Jul 2010 19:38:47 -0400
Received: by ceviche.home (Postfix, from userid 20848)
	id F0C47660B6; Mon, 26 Jul 2010 01:38:44 +0200 (CEST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset	conversion (problem description,
	solution/suggestion)
Message-ID: <jwv4ofndteg.fsf-monnier+emacs@HIDDEN>
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN>
	<83y6d2tryf.fsf@HIDDEN>
	<AANLkTikQg83JV3rWcqPrn58RX9LWGje_a+_HSvzvpWSG@HIDDEN>
	<83sk3ath9h.fsf@HIDDEN>
Date: Mon, 26 Jul 2010 01:38:44 +0200
In-Reply-To: <83sk3ath9h.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 23 Jul
	2010 17:16:58 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3585=0
X-Spam-Score: -1.2 (-)
X-Debbugs-Envelope-To: 6705
Cc: Juanma Barranquero <lekktu@HIDDEN>, 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.2 (-)

> I'm not sure, some of them need to be done as a group, or else
> features will become broken.  If someone can suggest a plan for
> incrementally adding this stuff, we could discuss it.

Actually, if it can be done incrementally, then there's no need for
a plan: the patches can be sent and evaluated one-by-one.


        Stefan





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 25 Jul 2010 10:10:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 06:10:30 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcyAA-0006dC-FG
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2010 06:10:30 -0400
Received: from mail-ey0-f172.google.com ([209.85.215.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcyA8-0006d6-RG
	for 6705 <at> debbugs.gnu.org; Sun, 25 Jul 2010 06:10:29 -0400
Received: by eyb7 with SMTP id 7so304610eyb.3
	for <6705 <at> debbugs.gnu.org>; Sun, 25 Jul 2010 03:10:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=t+X1PAiKoLc3HgKUR9N8pYaXP/pY3J0Q56P7VnaleWw=;
	b=IOGmrOu02pI2azVd/TnvGcqQCHCoO7GrUeW/dMyV/cAlwXOALBCiuwz+UIsqlFTf2E
	zhsTw6xaweoC/s9zf6r+mPg4xUSdgWKoYyEiJOYrw8GUE56w8romc0oNlxWdX5QP2v8d
	7+OzHzxGgpx+1iHjEW42vjohBW4SXdtVHJnN4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	b=N5DJj5Fiqbt+WnGhnCFtPPIuLJVAUZKrrWtn8U1pR1ew43tml2Z1IlQyyDRAetWYI8
	eVL+p2sNLtr6jMKbMcj1DWl8sApk1LP+iF6+6uw4y8AbZff5k/rmYPmgTvPxLPpBh4Xa
	KUQuKW5F4/yIFCKlVxuGJ0BSRQjuLv8zUJ1JE=
Received: by 10.213.25.143 with SMTP id z15mr5054237ebb.68.1280052630735;
	Sun, 25 Jul 2010 03:10:30 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id
	v59sm3643452eeh.10.2010.07.25.03.10.29
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 25 Jul 2010 03:10:30 -0700 (PDT)
Message-ID: <4C4C0D94.6000601@HIDDEN>
Date: Sun, 25 Jul 2010 13:10:28 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>, 6705 <at> debbugs.gnu.org
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN> <83iq46t6nq.fsf@HIDDEN>
	<4C49E50C.1070108@HIDDEN> <83fwz9ubzo.fsf@HIDDEN>
	<4C4A0F65.9040301@HIDDEN> <83mxtg8vsg.fsf@HIDDEN>
In-Reply-To: <83mxtg8vsg.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Eli Zaretskii wrote:

> If all you want is to pass raw bytes to programs that will be unable
> to interpret them _except_ as raw bytes, then where's the problem?
> The above already works in Emacs, doesn't it?

All i want is to say that it doesn't work with cygwin. Emacs can't pass 
raw data to it.
(it's not a problem for me (someone) to write/use a transcoding proxy 
util (it's possible with raw data), although it perfectly works 
(greping, for example) without it, but for that i need _correct_raw_ _data_)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 24 Jul 2010 20:33:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 24 16:33:21 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OclPN-0000ye-Lb
	for submit <at> debbugs.gnu.org; Sat, 24 Jul 2010 16:33:21 -0400
Received: from mtaout22.012.net.il ([80.179.55.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OclPL-0000yZ-Tb
	for 6705 <at> debbugs.gnu.org; Sat, 24 Jul 2010 16:33:20 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L6200K00X1OFX00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Sat, 24 Jul 2010 23:33:20 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6200FJDX3JJHA0@HIDDEN>;
	Sat, 24 Jul 2010 23:33:20 +0300 (IDT)
Date: Sat, 24 Jul 2010 23:33:19 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem description,
	solution/suggestion)
In-reply-to: <4C4A0F65.9040301@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83mxtg8vsg.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN> <83iq46t6nq.fsf@HIDDEN>
	<4C49E50C.1070108@HIDDEN> <83fwz9ubzo.fsf@HIDDEN>
	<4C4A0F65.9040301@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.6 (-)

> Date: Sat, 24 Jul 2010 00:53:41 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6705 <at> debbugs.gnu.org
>=20
> M-x eval-expression
> (setq coding-system-for-write 'utf-8)
> M-x grep
> test.exe "=C5=A0e=C5=A1ios =C5=BE=C4=85sys su =C5=A1e=C5=A1iais =
=C5=BE=C4=85sy=C4=8Diais" >> out.txt
>=20
> M-x eval-expression
> (setq coding-system-for-write 'cp1257)
> M-x grep
> test.exe "=C5=A0e=C5=A1ios =C5=BE=C4=85sys su =C5=A1e=C5=A1iais =
=C5=BE=C4=85sy=C4=8Diais" >> out.txt
>=20
>=20
> M-x eval-expression
> (setq coding-system-for-write 'utf-8)
> M-x grep
> test.exe "=D0=A1 =D0=BD=D0=BE=D0=B2=D1=8B=D0=BC =D0=B3=D0=BE=D0=
=B4=D0=BE=D0=BC =D0=95=D0=BB=D0=B8 =D0=97=D0=B0=D1=80=D0=B5=D1=82=
=D1=81=D0=BA=D0=B8!" >> out.txt
>=20
>=20
> M-x eval-expression
> (setq coding-system-for-write 'cp1251)
> M-x grep
> test.exe "=D0=A1 =D0=BD=D0=BE=D0=B2=D1=8B=D0=BC =D0=B3=D0=BE=D0=
=B4=D0=BE=D0=BC =D0=95=D0=BB=D0=B8 =D0=97=D0=B0=D1=80=D0=B5=D1=82=
=D1=81=D0=BA=D0=B8!" >> out.txt
>=20
>=20
> M-x eval-expression
> (setq coding-system-for-write 'utf-8)
> M-x grep
> test.exe "=CE=A7=CF=81=CE=AE=CF=83=CE=B7 =CE=B5=CE=B8=CE=BD=CE=B9=
=CE=BA=CF=8E=CE=BD =CE=BA=CE=B1=CE=B9 =CE=B5=CE=B9=CE=B4=CE=B9=CE=
=BA=CF=8E=CE=BD =CF=87=CE=B1=CF=81=CE=B1=CE=BA=CF=84=CE=AE=CF=81=CF=
=89=CE=BD" >> out.txt
>=20
> M-x eval-expression
> (setq coding-system-for-write 'iso-8859-7)
> M-x grep
> test.exe "=CE=A7=CF=81=CE=AE=CF=83=CE=B7 =CE=B5=CE=B8=CE=BD=CE=B9=
=CE=BA=CF=8E=CE=BD =CE=BA=CE=B1=CE=B9 =CE=B5=CE=B9=CE=B4=CE=B9=CE=
=BA=CF=8E=CE=BD =CF=87=CE=B1=CF=81=CE=B1=CE=BA=CF=84=CE=AE=CF=81=CF=
=89=CE=BD" >> out.txt

If all you want is to pass raw bytes to programs that will be unable
to interpret them _except_ as raw bytes, then where's the problem?
The above already works in Emacs, doesn't it?

> File 'out.txt' attached.

Try visiting it, and you will see what I mean.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 21:53:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 17:53:50 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcQBh-0007XM-ET
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:53:49 -0400
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcQBe-0007X1-ND
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:53:47 -0400
Received: by ewy22 with SMTP id 22so266026ewy.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 14:53:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type; bh=zZHlQ7L/NJ1Z12wTnH8h2t4yWvLht2PPgn5bDYUoqz8=;
	b=C4zGnl/79i2F3pkiXMAYqNzgtjHHnUlkO2sgjdszzsLDQ/jJdZn1va+h1a7nlNLPBH
	ExjClXMn/IB1Ff0NvRSEdrwQR+xOsJXrNaXt7m0n5sMRJh7c4nTPyfR6D+5Lc8EZmqI/
	SEPvHH0EWFoWy72ntwTlMay3ww4te45PrkkMA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type;
	b=g8kcEws9uXeELu75w3IA99yn9A01LwTAmoXE/H2ETvK+xUuShVjQ6lI8/9/PedGpxH
	kmhzUCIPaSJ8x1WA0FpLewFM/jVmkThJ53dGxdN5s9yZzUJ+xiJFZFZmRnWPiRuYRmfl
	Goa55PY7xUM5Wg9GEJvzArI65QQjm9aPImOVE=
Received: by 10.213.101.71 with SMTP id b7mr2646306ebo.32.1279922024444;
	Fri, 23 Jul 2010 14:53:44 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id
	a48sm1039329eei.12.2010.07.23.14.53.43
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 14:53:44 -0700 (PDT)
Message-ID: <4C4A0F65.9040301@HIDDEN>
Date: Sat, 24 Jul 2010 00:53:41 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN> <83iq46t6nq.fsf@HIDDEN>
	<4C49E50C.1070108@HIDDEN> <83fwz9ubzo.fsf@HIDDEN>
In-Reply-To: <83fwz9ubzo.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------060601020004070008040208"
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

This is a multi-part message in MIME format.
--------------060601020004070008040208
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Eli Zaretskii wrote:

> Only if that encoding matches the current user's codepage.

No. NO. *NO*. Try. I already showed how and i can repeat it AGAIN:

#include <stdio.h>
int main (int argc, char ** argv) {
     printf("argv[1]: %s\n", argv[1]);
     return 0;
}

gcc.EXE (GCC) 3.4.5 (mingw-vista special r3)

gcc -o test test.c

emacs -Q

M-x eval-expression
(setq coding-system-for-write 'utf-8)
M-x grep
test.exe "Šešios žąsys su šešiais žąsyčiais" >> out.txt

M-x eval-expression
(setq coding-system-for-write 'cp1257)
M-x grep
test.exe "Šešios žąsys su šešiais žąsyčiais" >> out.txt


M-x eval-expression
(setq coding-system-for-write 'utf-8)
M-x grep
test.exe "С новым годом Ели Заретски!" >> out.txt


M-x eval-expression
(setq coding-system-for-write 'cp1251)
M-x grep
test.exe "С новым годом Ели Заретски!" >> out.txt


M-x eval-expression
(setq coding-system-for-write 'utf-8)
M-x grep
test.exe "Χρήση εθνικών και ειδικών χαρακτήρων" >> out.txt

M-x eval-expression
(setq coding-system-for-write 'iso-8859-7)
M-x grep
test.exe "Χρήση εθνικών και ειδικών χαρακτήρων" >> out.txt


File 'out.txt' attached.


--------------060601020004070008040208
Content-Type: text/plain;
 name="out.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="out.txt"

YXJndlsxXTogxaBlxaFpb3Mgxb7EhXN5cyBzdSDFoWXFoWlhaXMgxb7EhXN5xI1pYWlzDQph
cmd2WzFdOiDQZfBpb3Mg/uBzeXMgc3Ug8GXwaWFpcyD+4HN56GlhaXMNCmFyZ3ZbMV06INCh
INC90L7QstGL0Lwg0LPQvtC00L7QvCDQldC70Lgg0JfQsNGA0LXRgtGB0LrQuCENCmFyZ3Zb
MV06INEg7e7i++wg4+7k7uwgxevoIMfg8OXy8eroIQ0KYXJndlsxXTogzqfPgc6uz4POtyDO
tc64zr3Ouc66z47OvSDOus6xzrkgzrXOuc60zrnOus+Ozr0gz4fOsc+BzrHOus+Ezq7Pgc+J
zr0NCmFyZ3ZbMV06INfx3vPnIOXo7enq/u0g6uHpIOXp5Onq/u0g9+Hx4er03vH57Q0K
--------------060601020004070008040208--




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 21:26:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 17:25:59 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcPkk-0007KR-Pn
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:25:58 -0400
Received: from mtaout21.012.net.il ([80.179.55.169])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcPki-0007KL-0Y
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:25:57 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
	a-mtaout21.012.net.il (HyperSendmail v2007.08) id
	<0L6100G004JP8O00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Sat, 24 Jul 2010 00:25:32 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout21.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6100DZH4UJLOB0@HIDDEN>;
	Sat, 24 Jul 2010 00:25:32 +0300 (IDT)
Date: Sat, 24 Jul 2010 00:25:31 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem description,
	solution/suggestion)
In-reply-to: <4C49E50C.1070108@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83fwz9ubzo.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN> <83iq46t6nq.fsf@HIDDEN>
	<4C49E50C.1070108@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.6 (-)

> Date: Fri, 23 Jul 2010 21:53:00 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6705 <at> debbugs.gnu.org
>=20
> Eli Zaretskii wrote:
> >> Date: Fri, 23 Jul 2010 18:35:40 +0300
> >> From: Laimonas V=C4=97bra<laimonas.vebra@HIDDEN>
> >> CC: 6705 <at> debbugs.gnu.org
> >>
> >> M-x grep
> >> test.exe "=C4=94=C4=BF=C4=B0">  out.txt
> >>
> >> $ cat out.txt
> >> argv[1]: =C4=94=C4=BF=C4=B0
> >
> > And what does that prove, exactly?  That MinGW programs can suppo=
rt
> > non-ASCII characters?  I never said they didn't.
>=20
> Exactly? It means, that now mingw (native) programs can receive arg=
s=20
> from Emacs in whatever (except utf-16|32 and maybe few others) enco=
ding=20
> without corruption.

Only if that encoding matches the current user's codepage.

Now come on, this discussion has nothing more to contribute to the
subject.  Time to stop it.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 20:00:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 16:00:18 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcOPq-0006ij-7H
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 16:00:18 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1OcOPo-0006ic-0Y
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 16:00:16 -0400
Received: by bwz7 with SMTP id 7so1942666bwz.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 13:00:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:in-reply-to
	:references:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=6mMjclI7Hl7v2HiWJcEp8VGm2WH5Cx7LYZR6jIJ4INc=;
	b=lX1x/eOR9dbVUFlZDN7m0H5ScYqgVS9GOpaQ7NpGeYHtkO0C/tyR7sNsFwF4TgLQNg
	MzQo39nDzlbvYxao3HAOaonGpNOAl8bjPkgrAPMXp4XpVSHA3XjsBFVgje7VNXH00HQU
	U8hqSPAMmgdYRDlgOIbZxOu02Dim+VbA9LYVM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=jZDzu8E4IgnAmusQSWryHpQUSm1i2rdTJTGcqf/4CAun29lS+JsnFcQthKib4T/cKC
	eO2oNC4lbfEcj6jFdnhETk5/+8dlrYzKmN2AFOCU6Qc5sSVFQerhwdhFv5Qj5tkPSXYQ
	wusxitT37AETO6Mbcx6jpvAO9x+VjJkABw4XA=
Received: by 10.204.10.137 with SMTP id p9mr2962207bkp.51.1279915212269; Fri, 
	23 Jul 2010 13:00:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Fri, 23 Jul 2010 12:59:52 -0700 (PDT)
In-Reply-To: <4C49F2AD.5000804@HIDDEN>
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN> 
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> 
	<83pqyetgeo.fsf@HIDDEN> <4C49B6CC.9030509@HIDDEN>
	<AANLkTi=q-__SJCLVjBboj+iSMrQJFwLEcxdicCThvwWB@HIDDEN> 
	<4C49F2AD.5000804@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Fri, 23 Jul 2010 21:59:52 +0200
Message-ID: <AANLkTinpiPH0Y2KyAF2shRwXVeBFVS9j-TaQ7p2CQH4F@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset 
	conversion (problem description, solution/suggestion)
To: =?UTF-8?Q?Laimonas_V=C4=97bra?= <laimonas.vebra@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Fri, Jul 23, 2010 at 21:51, Laimonas V=C4=97bra <laimonas.vebra@HIDDEN=
m> wrote:

> I'd like to and if you haven't noticed -- i'am trying... ;-)

Good luck. (I'm being sincere, not facetious.)

> And that is why i also prefer native build of Emacs (and think, that it
> should be less buggy).

I've never felt the native build was abnormally buggy (compared to the
POSIX builds).

> I suppose, that making it work better with Cygwin (like other external ap=
ps)
> would just make it better.

Sure, assuming that there's a non-hackish way to do it. It's just that
there are lots of things that seem to me more useful, given our
limited resources. But YMMV.

> In the sources there are already much (well, not so little) of the cygwin
> related stuff, so if it ain't going to be dropped, then why it
> couldn't/shouldn't be improved?

Again: if there's a way to improve it that does not make already
existing code worse, why not?

=C2=A0 =C2=A0 Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 19:51:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 15:51:23 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcOHC-0006df-Kx
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:51:22 -0400
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcOHB-0006dZ-Kf
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:51:22 -0400
Received: by ewy22 with SMTP id 22so231068ewy.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 12:51:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=WmBIS+kift7Cr7liKbBr47HqkJLfAwmptscxx7d3cjQ=;
	b=GdUx3R0PAUtBtnNuFU3bhHMtyVOzW1apu6akTrmyLen+7Y2mCaRGeSF2M2HEdf1Vpm
	o53TPGxSfEL9DBDf112PaawwLwtKuotvQG6xsSkULTo89KH8vMI/hU6QXTUOBZcFpMuw
	kKs8soQyQO8aP5g+R1vU6zmDhuOUz4zB52Z20=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	b=UWTAzJGhL35enu256nyhsf+ucyG0JfSKZzRmXC0VrAKHqrrLmER11I+s6Z/f8FlZrT
	uuEKsibIGfDRq5JDFg1hXUv8/HoCqA/9tJ/XmdabLq0Be8xlEUowret8Dcmy4UZFKxvj
	5i50Q8ZmrUhJ6hwofUy46/I2Xnq91TcVKxO3E=
Received: by 10.213.15.82 with SMTP id j18mr3754726eba.1.1279914678077;
	Fri, 23 Jul 2010 12:51:18 -0700 (PDT)
Received: from [84.240.35.136] (lan-84-240-35-136.vln.skynet.lt
	[84.240.35.136])
	by mx.google.com with ESMTPS id a48sm893618eei.7.2010.07.23.12.51.17
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 12:51:17 -0700 (PDT)
Message-ID: <4C49F2AD.5000804@HIDDEN>
Date: Fri, 23 Jul 2010 22:51:09 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.10) Gecko/20100504 SeaMonkey/2.0.5
MIME-Version: 1.0
To: Juanma Barranquero <lekktu@HIDDEN>, 6705 <at> debbugs.gnu.org
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN>
	<AANLkTi=q-__SJCLVjBboj+iSMrQJFwLEcxdicCThvwWB@HIDDEN>
In-Reply-To: <AANLkTi=q-__SJCLVjBboj+iSMrQJFwLEcxdicCThvwWB@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Juanma Barranquero wrote:
> On Fri, Jul 23, 2010 at 17:35, Laimonas Vėbra<laimonas.vebra@HIDDEN>  wrote:
>
>> bzr log says that much of the active development of the w32proc.c and others
>> actually ended somewhere in the 2001-2003... ;-)
>
> Are you volunteering? By all means, welcome aboard!

I'd like to and if you haven't noticed -- i'am trying... ;-)

> Because the Cygwin build works pretty well when your environment is
> Cygwin. And some of us, to put it mildly, wouldn't touch that crap
> again if it were the last working environment on the surface of the
> Earth. I certainly don't plan to spend a second making Emacs work
> better with Cygwin (tought of course I have nothing against other
> people doing it; I'm not an anti-Cygwin zealot).

And that is why i also prefer native build of Emacs (and think, that it 
should be less buggy).
I suppose, that making it work better with Cygwin (like other external 
apps) would just make it better.
In the sources there are already much (well, not so little) of the 
cygwin related stuff, so if it ain't going to be dropped, then why it 
couldn't/shouldn't be improved?

>
>> Same question -- why when bother with w32 development at all?
>
> Seems like there's a sizable user base of non-Cygwin users of Emacs on
> Windows. And some of us like to work on Emacs development.

That question implied, that it's worth to improve w32.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 19:08:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 15:08:24 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcNbb-0006KO-UE
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:08:24 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1OcNbZ-0006KF-VX
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:08:22 -0400
Received: by bwz7 with SMTP id 7so1917274bwz.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 12:08:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:in-reply-to
	:references:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=pbCwEVRQykp7bLtMzl4t3m5HPc+WBRv7LR+9+ilZzd8=;
	b=iBsjT/mGRNAXEDhzbtQDEbgr2ECR9wKKvk7T5Z0HJIdeAs5dfvHHDarfDLsUM0xV1E
	r2wA9Dm3uRxncnCu6VqFIdEL8nikVrEBKBR367kIn1V1HmObEqa0FhL7gnXeRSu/AutQ
	Vgk4HS1x9qEgv26gEjO1b4MwV4UDNFhQUFulg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=HPsxW+g0yqK6FsMaXXNWvaZA3IBh/w7QJ9vOy33h0DLHLHHTtCoqew537BN71cfqV5
	UF1F1XC7yexzUG9zNwIXN7dXJ0EBBRVzll72OD/yveQYRUARytyXKQXW3grVOJN4Egt4
	AfcB+3x/6qCYD6ogmzdlKClOpomm3MudiLUow=
Received: by 10.204.142.205 with SMTP id r13mr2555549bku.207.1279912099200; 
	Fri, 23 Jul 2010 12:08:19 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Fri, 23 Jul 2010 12:07:59 -0700 (PDT)
In-Reply-To: <4C49B6CC.9030509@HIDDEN>
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN> 
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> 
	<83pqyetgeo.fsf@HIDDEN> <4C49B6CC.9030509@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Fri, 23 Jul 2010 21:07:59 +0200
Message-ID: <AANLkTi=q-__SJCLVjBboj+iSMrQJFwLEcxdicCThvwWB@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset 
	conversion (problem description, solution/suggestion)
To: =?UTF-8?Q?Laimonas_V=C4=97bra?= <laimonas.vebra@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: Eli Zaretskii <eliz@HIDDEN>, 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Fri, Jul 23, 2010 at 17:35, Laimonas V=C4=97bra <laimonas.vebra@HIDDEN=
m> wrote:

> bzr log says that much of the active development of the w32proc.c and oth=
ers
> actually ended somewhere in the 2001-2003... ;-)

Are you volunteering? By all means, welcome aboard!

> On the other hand -- why when you think w32 developers should invest thei=
r
> time developing w32 stuff at all (if we have cygwin build which works
> =E2=80=9Epretty well=E2=80=9C)...?

Because the Cygwin build works pretty well when your environment is
Cygwin. And some of us, to put it mildly, wouldn't touch that crap
again if it were the last working environment on the surface of the
Earth. I certainly don't plan to spend a second making Emacs work
better with Cygwin (tought of course I have nothing against other
people doing it; I'm not an anti-Cygwin zealot).

> Same question -- why when bother with w32 development at all?

Seems like there's a sizable user base of non-Cygwin users of Emacs on
Windows. And some of us like to work on Emacs development.

=C2=A0 =C2=A0 Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 18:53:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 14:53:14 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcNMw-0006DC-92
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:53:14 -0400
Received: from mail-ey0-f172.google.com ([209.85.215.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcNMt-0006D5-Lm
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:53:12 -0400
Received: by eyb7 with SMTP id 7so113175eyb.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 11:53:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=zBUpTYwRhzBGkPp/a+qBxgoTyJFq3JCinf9rloGEHBg=;
	b=wRr/DOknFWOQsF7/6XsVdwGpuHt7mCS88B6Rq1dPt6O3iZcWSSR/xNRhEIhf8wn6D0
	krUAtfddRHGk3phPlqow7vZVpijgbEAZhSa9PpCwr92/GOytIkA0qUu3pzlUMv0cjbsf
	pm2ckKNDrciG1k5SRwh+lWmGNuDYLAR9MbxdM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=qI6e+SOo9wpvD50O+NQhvwkfwK0d3Q7dSaEc83C0UgzRDGGT69FK1oCNfmGcS3KBDK
	V81yeYGgsFSiuwQPyrHxOaeEu0+OxxNI+Ne/Uxq+/XZ5r2+QwpuvgCIPrMB/oFp5vmVK
	GBGoWq41GwieD+AZ0PO7W0kc2JFMz7EIvJxqg=
Received: by 10.213.28.5 with SMTP id k5mr3530303ebc.40.1279911189200;
	Fri, 23 Jul 2010 11:53:09 -0700 (PDT)
Received: from [84.240.35.136] (lan-84-240-35-136.vln.skynet.lt
	[84.240.35.136])
	by mx.google.com with ESMTPS id z55sm811625eeh.21.2010.07.23.11.53.08
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 11:53:08 -0700 (PDT)
Message-ID: <4C49E50C.1070108@HIDDEN>
Date: Fri, 23 Jul 2010 21:53:00 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.10) Gecko/20100504 SeaMonkey/2.0.5
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN> <83iq46t6nq.fsf@HIDDEN>
In-Reply-To: <83iq46t6nq.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Eli Zaretskii wrote:
>> Date: Fri, 23 Jul 2010 18:35:40 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> CC: 6705 <at> debbugs.gnu.org
>>
>> M-x grep
>> test.exe "ĔĿİ">  out.txt
>>
>> $ cat out.txt
>> argv[1]: ĔĿİ
>
> And what does that prove, exactly?  That MinGW programs can support
> non-ASCII characters?  I never said they didn't.

Exactly? It means, that now mingw (native) programs can receive args 
from Emacs in whatever (except utf-16|32 and maybe few others) encoding 
without corruption. That's what i also expect (want) for the cygwin.
	




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 18:06:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 14:06:08 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcMdL-0005rf-Q5
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:06:07 -0400
Received: from mtaout20.012.net.il ([80.179.55.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcMdJ-0005rI-48
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:06:06 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0L6000I00VJUE600@HIDDEN> for
	6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 21:06:02 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000H05VM1VB30@HIDDEN>;
	Fri, 23 Jul 2010 21:06:02 +0300 (IDT)
Date: Fri, 23 Jul 2010 21:06:01 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem description,
	solution/suggestion)
In-reply-to: <4C49B6CC.9030509@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83iq46t6nq.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
	<4C49B6CC.9030509@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.6 (-)

> Date: Fri, 23 Jul 2010 18:35:40 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6705 <at> debbugs.gnu.org
>=20
> M-x grep
> test.exe "=C4=94=C4=BF=C4=B0" > out.txt
>=20
> $ cat out.txt
> argv[1]: =C4=94=C4=BF=C4=B0

And what does that prove, exactly?  That MinGW programs can support
non-ASCII characters?  I never said they didn't.

> bzr log says that much of the active development of the w32proc.c a=
nd=20
> others actually ended somewhere in the 2001-2003... ;-)

So what?

> On the other hand -- why when you think w32 developers should inves=
t=20
> their time developing w32 stuff at all (if we have cygwin build whi=
ch=20
> works =E2=80=9Epretty well=E2=80=9C)...?

For the users who use Emacs in conjunction with native w32 programs.
Not every Windows program is necessarily available in Cygwin, you
know.  If you need to use Emacs in a non-Cygwin environment, the
native build will fit much better.

> > fixing incompatibilities between the w32 Emacs and Cygwin, when a
> > Cygwin build of Emacs is available and works pretty well, judging=
 by
> > the few of its users who are active on the emacs-devel list.  I d=
on't
>=20
> Are they using it in unicode aspect/context?

I don't know; why won't you ask on emacs-devel?

> > know why you say it's "potentially" more buggy -- it uses mostly =
the
> > same code that runs on GNU/Linux, so actually it should be _less_
> > buggy than the native w32 build, because it is used by a larger n=
umber
> > of users.  Did you even try to switch to the Cygwin build?  If no=
t,
> > perhaps you should.
>=20
> Same question -- why when bother with w32 development at all?

See above: same answer.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 15:35:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 11:35:51 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcKHv-0004iR-9M
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 11:35:51 -0400
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcKHt-0004iM-Hf
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 11:35:50 -0400
Received: by ewy22 with SMTP id 22so142299ewy.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 08:35:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=O3fpYDYa+FoaCSfGLjYwDb8mvgORbzNNjAexO0D9G/o=;
	b=GxW3YOhbC443Gs0p2wXr3FnZZOtpPR/OY5g4RcUNXSTZW6LDiJt8b1mxqomTCToTDq
	+GOqqmIpM4u/Ng+IOLYN/Yo7GUHlKMzryWsnucWbYmzySQQC8xGMd4XybdYt6ctILKXQ
	sGsKlceH1PC6Z1p2jEyZftrwzJeP3EPBWf0bw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=u5sq8Jji/ippQkuCBolinpHp2Km0+9UKJhhezIpmAJcpvYfH+dro8FQZW8oujTZL79
	imNVT3lnWErRYxA4L8VgJpvBW6jv/7oy5NUR515+qXhAN1vLIiK3KR2FbbnfKlfA2gFl
	khauB/+GjTlYc4ByLilMK4IKnEaEvHdGUAr5c=
Received: by 10.213.12.196 with SMTP id y4mr692380eby.61.1279899346742;
	Fri, 23 Jul 2010 08:35:46 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id v59sm563393eeh.4.2010.07.23.08.35.45
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 08:35:46 -0700 (PDT)
Message-ID: <4C49B6CC.9030509@HIDDEN>
Date: Fri, 23 Jul 2010 18:35:40 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;	erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN> <83pqyetgeo.fsf@HIDDEN>
In-Reply-To: <83pqyetgeo.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

Eli Zaretskii wrote:
>> Date: Fri, 23 Jul 2010 15:57:46 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> CC: 6705 <at> debbugs.gnu.org
>>
>> It's not the problem to pass utf-8 arguments to natvive (mingw)
>> apps.
>
> If these MinGW applications use Unicode (UTF-16) APIs, that's true.
> But if they use the ANSI APIs (and most of them do), then you simply
> cannot pass to them command-line arguments encoded in any encoding
> other than the current codepage.

It's not true when we're launching subprocess using CreateProcessA()
and passing args to it, i.e. like Emacs does). Try:

#include <stdio.h>
int main (int argc, char ** argv) {
	printf("argv[1]: %s\n", argv[1]);
	return 0;
}

gcc.EXE (GCC) 3.4.5 (mingw-vista special r3)

gcc -o test test.c

M-x grep
test.exe "ĔĿİ" > out.txt

$ cat out.txt
argv[1]: ĔĿİ


> In my view, users of the w32 build of Emacs who use Cygwin tools
> outside Emacs are a minority.  There are native w32 ports of most of
> the tools you have in Cygwin, and there is the Cygwin build of Emacs.
> I don't see why the handful of Emacs developers who contribute to the
> w32 port should invest a significant part of their scarce resources on

bzr log says that much of the active development of the w32proc.c and 
others actually ended somewhere in the 2001-2003... ;-)
On the other hand -- why when you think w32 developers should invest 
their time developing w32 stuff at all (if we have cygwin build which 
works „pretty well“)...?

> fixing incompatibilities between the w32 Emacs and Cygwin, when a
> Cygwin build of Emacs is available and works pretty well, judging by
> the few of its users who are active on the emacs-devel list.  I don't

Are they using it in unicode aspect/context? It's the most important 
question, because many people don't get any problems if their are not 
dealing with unicode (or at first/least with non english 
ansi/multilingual aspects).


> know why you say it's "potentially" more buggy -- it uses mostly the
> same code that runs on GNU/Linux, so actually it should be _less_
> buggy than the native w32 build, because it is used by a larger number
> of users.  Did you even try to switch to the Cygwin build?  If not,
> perhaps you should.

Same question -- why when bother with w32 development at all?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 14:35:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 10:35:42 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcJLi-0004G4-6j
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:35:42 -0400
Received: from mtaout21.012.net.il ([80.179.55.169])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcJLf-0004Fz-Ol
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:35:40 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
	a-mtaout21.012.net.il (HyperSendmail v2007.08) id
	<0L6000200LTDUE00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:35:28 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout21.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000NXXLV30M90@HIDDEN>;
	Fri, 23 Jul 2010 17:35:28 +0300 (IDT)
Date: Fri, 23 Jul 2010 17:35:27 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem description,
	solution/suggestion)
In-reply-to: <4C4991CA.3010103@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83pqyetgeo.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
	<4C4991CA.3010103@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.6 (-)

> Date: Fri, 23 Jul 2010 15:57:46 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6705 <at> debbugs.gnu.org
>=20
> It's not the problem to pass utf-8 arguments to natvive (mingw)
> apps.

If these MinGW applications use Unicode (UTF-16) APIs, that's true.
But if they use the ANSI APIs (and most of them do), then you simply
cannot pass to them command-line arguments encoded in any encoding
other than the current codepage.

> I'd like to grep for some utf-8 encoded string.

Stop.  That's your problem, right there: you can't have this, not
unless your current codepage is 65001.

> > I didn't try to imply that Cygwin was the problem.  I was suggest=
ing
> > to use the Cygwin build of Emacs.  Why do you insist on using the
> > native w32 build, when it is obvious that the compatibility betwe=
en
> > what it does and what Cygwin expects is marginal at best?
>=20
> I tried to imply, that cygwin tools is mature/consistent enough for=
 the=20
> w32 to work with.

Mature, but incompatible with the w32 build of Emacs.  And Cygwin 1.7
made them even more incompatible.

> In other words -- (why) do you think it's not worth to tune Emacs w=
ith=20
> cygwin system (plenty of useful tools; especially if we think about=
=20
> working (efficiently, the same) with emacs on different systems: *n=
ix, w32)?

In my view, users of the w32 build of Emacs who use Cygwin tools
outside Emacs are a minority.  There are native w32 ports of most of
the tools you have in Cygwin, and there is the Cygwin build of Emacs.
I don't see why the handful of Emacs developers who contribute to the
w32 port should invest a significant part of their scarce resources o=
n
fixing incompatibilities between the w32 Emacs and Cygwin, when a
Cygwin build of Emacs is available and works pretty well, judging by
the few of its users who are active on the emacs-devel list.  I don't
know why you say it's "potentially" more buggy -- it uses mostly the
same code that runs on GNU/Linux, so actually it should be _less_
buggy than the native w32 build, because it is used by a larger numbe=
r
of users.  Did you even try to switch to the Cygwin build?  If not,
perhaps you should.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 14:33:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 10:33:55 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcJJy-0004F0-N7
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:33:54 -0400
Received: from mtaout22.012.net.il ([80.179.55.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcJJw-0004Er-DX
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:33:53 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L6000M00KN0AL00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:17:01 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000CJXL0AZSQ0@HIDDEN>;
	Fri, 23 Jul 2010 17:17:00 +0300 (IDT)
Date: Fri, 23 Jul 2010 17:16:58 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset	conversion (problem description,
	solution/suggestion)
In-reply-to: <AANLkTikQg83JV3rWcqPrn58RX9LWGje_a+_HSvzvpWSG@HIDDEN>
To: Juanma Barranquero <lekktu@HIDDEN>
Message-id: <83sk3ath9h.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN>
	<83y6d2tryf.fsf@HIDDEN>
	<AANLkTikQg83JV3rWcqPrn58RX9LWGje_a+_HSvzvpWSG@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6705
Cc: laimonas.vebra@HIDDEN, 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.6 (-)

> From: Juanma Barranquero <lekktu@HIDDEN>
> Date: Fri, 23 Jul 2010 12:45:08 +0200
> Cc: laimonas.vebra@HIDDEN, 6705 <at> debbugs.gnu.org
>=20
> On Fri, Jul 23, 2010 at 12:26, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
> > Neither. =C2=A0I'm talking about using the W APIs on versions of =
Windows
> > that support them, and A APIs elsewhere, including on Windows 9X.
>=20
> OK, I see. Lots and lots of wrappers and checks.
>=20
> > That's why I said this is a non-trivial job.
>=20
> Yes. But it can be done incrementally, I think.

I'm not sure, some of them need to be done as a group, or else
features will become broken.  If someone can suggest a plan for
incrementally adding this stuff, we could discuss it.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 12:57:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 08:57:54 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcHp4-0003WM-IV
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 08:57:54 -0400
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OcHp2-0003WB-EW
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 08:57:53 -0400
Received: by ewy22 with SMTP id 22so70069ewy.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 05:57:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=vVnhBST/UcRaAHrSYkCLRDm7uxsXktI+fwhCMncwqSQ=;
	b=mckh8vAXPY+9AgyaSznJAwac9Inl1ESehFZ8zGSZ4fJY3N+HaKeYHQENi8Ia69Z9vJ
	W4766ojhr1S65rovh28IhiVNY05C2EPHs6tQmEUxAXk6PPYfRPEN27IrB7nUds44uyIi
	hsrbMoOSCWG1GFtABJwXvGJAOURiCiAXrQVjU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=UmXQo7DWrutLggAoMk5i1W1e6RzPqpBoujyhMulrIvg0vXm05MwOqM7bGWHWly53Ik
	zUU1JN069HsNyn2yLCXE9ONh6n+zOp8ODSzR30/6+Uk2c6tGOkwgXb+FLP9Ocg8VGROb
	KfafNSBtSpfGCharewOitnDA46QTF61V0/CCA=
Received: by 10.213.33.197 with SMTP id i5mr3253477ebd.45.1279889869567;
	Fri, 23 Jul 2010 05:57:49 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id a48sm350892eei.1.2010.07.23.05.57.48
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 05:57:49 -0700 (PDT)
Message-ID: <4C4991CA.3010103@HIDDEN>
Date: Fri, 23 Jul 2010 15:57:46 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;	erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN> <831vauv6q1.fsf@HIDDEN>
In-Reply-To: <831vauv6q1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.8 (--)

Eli Zaretskii wrote:
>> Date: Thu, 22 Jul 2010 23:59:09 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> CC: 6705 <at> debbugs.gnu.org
>>
>> Eli Zaretskii wrote:
>>
>>> Sorry, I cannot understand your comments.  You talk about corrupted
>>> conversion, but never add any detailed explanations, just examples.
>>> Could you please elaborate?
>>
>> That was supposed to be detailed explanations through the detailed
>> 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 external
> 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.

Well, it will work. It's not the problem to pass utf-8 arguments to 
natvive (mingw) apps. It won't work with cygwin, and that „won't work“ 
is not for sure (it can, under some circumstances, and i'd say inproper 
setup). So i think i should elaborate.


> 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.

Ok, from the begining.
I'd like to grep for some utf-8 encoded string. Choose it whatever (non 
ascii) value you like, let's say 'ĔĿİ' (hex: 0x[C494, C4BF, C4B0]).

echo -e "-ĔĿİ-\n_ĔĿİ_\nELI\nĔĿİ" > file.txt

grep --version
GNU grep 2.6.3 (cygwin)

wscript.echo (GetLocale())
1063
http://www.cryer.co.uk/brian/windows/info_windows_locale_table.htm

LANG="" (that means not set, cygwin default value "C.UTF-8")

M-x grep
grep -nH -e "ĔĿİ" file.txt

Grep finished with no matches found at Fri Jul 23 13:56:22

Why?

Because:
grep.c gets args "Ä”ÄæÄ°" (utf-8 string, hex: 0x[C384, E2809D, C384, 
C3A6, C384, C2B0]).

Why?
Because original string value 0x[C494, C4BF, C4B0] in interpreted to be 
in the current locale codepage (cp1257) encoding/charset:
http://msdn.microsoft.com/en-us/goglobal/cc305150.aspx

and is interpreted (by the cygwin/os api) as six characters: 0x (C4, 94, 
C4, BF, C4, B0); i.e. 'Ä”ÄæÄ°', converted to utf-16 and then to utf-8.



> 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?

I tried to imply, that cygwin tools is mature/consistent enough for the 
w32 to work with. And from that point of view there is no advantage of 
using cygwin Emacs build instead of native one (cygwin build is slower 
and potentially more buggy)

> 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?

Why? We benefit at least in that sense, that both of them (native and 
cygwin app) will work (correctly) on w32. As correctly as it's possible 
with the current code.
In other words -- (why) do you think it's not worth to tune Emacs with 
cygwin system (plenty of useful tools; especially if we think about 
working (efficiently, the same) with emacs on different systems: *nix, w32)?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 10:45:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 06:45:33 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcFkz-0001ue-GH
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:45:33 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1OcFkx-0001uZ-ID
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:45:32 -0400
Received: by bwz7 with SMTP id 7so1604876bwz.3
	for <6705 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 03:45:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:in-reply-to
	:references:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=NZvuSMGWt9h2gHSQLhub/J0i7yvqBcvrObwGeDvDW/I=;
	b=b5P5W6e8UeZgcu/Td6bbTwXRu33X9tx9PAeetN4fImyvu93yXmoZVvb1LOTKedPQNY
	ofYHHPmVGiYvka+Y/MaoDWfSgLJS9OktWoebkbbrvstQPVYB1iTpLzGBaBJSZlidEoeW
	OxEvvD8tiDwVrwaM94jMZze2j8gmwuVJ0IxLg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=hDcvyWeZFQQ/bkstB9PaLzhJ05MqI15n2XgrZr8+ZJ51g0wSeMyQMmm5G6HeTqd7cc
	Jp4rL4Dw7YR8VDQXU7eOu+7eLG0kljhbNkwc7BuWbWGW3OvbGmUgfVxMnjVvYvg1DIrR
	9vuJ5cTTxcYFsv9dC+VHwr5BIwYwxJVqkvdqY=
Received: by 10.204.59.136 with SMTP id l8mr2057765bkh.84.1279881928215; Fri, 
	23 Jul 2010 03:45:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Fri, 23 Jul 2010 03:45:08 -0700 (PDT)
In-Reply-To: <83y6d2tryf.fsf@HIDDEN>
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN> 
	<AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN> 
	<83y6d2tryf.fsf@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Fri, 23 Jul 2010 12:45:08 +0200
Message-ID: <AANLkTikQg83JV3rWcqPrn58RX9LWGje_a+_HSvzvpWSG@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset 
	conversion (problem description, solution/suggestion)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: laimonas.vebra@HIDDEN, 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Fri, Jul 23, 2010 at 12:26, Eli Zaretskii <eliz@HIDDEN> wrote:

> Neither. =C2=A0I'm talking about using the W APIs on versions of Windows
> that support them, and A APIs elsewhere, including on Windows 9X.

OK, I see. Lots and lots of wrappers and checks.

> That's why I said this is a non-trivial job.

Yes. But it can be done incrementally, I think.

=C2=A0 =C2=A0 Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 10:26:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 06:26:35 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcFSc-0001jb-PD
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:26:35 -0400
Received: from mtaout22.012.net.il ([80.179.55.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcFSZ-0001jW-Gz
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:26:31 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L6000D00AB1WX00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 13:26:00 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000C70ABBZS30@HIDDEN>;
	Fri, 23 Jul 2010 13:26:00 +0300 (IDT)
Date: Fri, 23 Jul 2010 13:26:00 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset	conversion (problem description,
	solution/suggestion)
In-reply-to: <AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN>
To: Juanma Barranquero <lekktu@HIDDEN>
Message-id: <83y6d2tryf.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN>
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 6705
Cc: laimonas.vebra@HIDDEN, 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.7 (-)

> From: Juanma Barranquero <lekktu@HIDDEN>
> Date: Fri, 23 Jul 2010 00:56:33 +0200
> Cc: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>, 6705@HIDDEN=
u.org
>=20
> On Thu, Jul 22, 2010 at 21:50, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
> > The Windows build of Emacs doesn't yet use the UTF-16 APIs. =C2=
=A0Doing
> > that is a large job; volunteers are welcome, of course.
>=20
> What do you mean, using the W versions of API functions? That would=
 be
> incompatible with 16-bit Windows (or, at least, as compatible as th=
e
> Microsoft Layer for Unicode allows, and I wouldn't like to bet on i=
t).
> Or are you talking about abandoning 16-bit Windows compatibility?

Neither.  I'm talking about using the W APIs on versions of Windows
that support them, and A APIs elsewhere, including on Windows 9X.

That's why I said this is a non-trivial job.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 23 Jul 2010 10:22:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 06:22:51 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1OcFP0-0001fu-9u
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:22:50 -0400
Received: from mtaout22.012.net.il ([80.179.55.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1OcFOx-0001fo-52
	for 6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:22:48 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L6000D009C88J00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Fri, 23 Jul 2010 13:21:42 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000C4PA45ZQ20@HIDDEN>;
	Fri, 23 Jul 2010 13:21:42 +0300 (IDT)
Date: Fri, 23 Jul 2010 13:21:42 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem
	description,	solution/suggestion)
In-reply-to: <4C48B11D.4050202@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <831vauv6q1.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
	<4C48B11D.4050202@HIDDEN>
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.7 (-)

> Date: Thu, 22 Jul 2010 23:59:09 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6705 <at> 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?





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.
Merged 6546 6705. Request was from Laimonas Vėbra <laimonas.vebra@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 22 Jul 2010 22:57:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 18:57:00 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Oc4hH-0004cZ-Tv
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 18:57:00 -0400
Received: from mail-bw0-f44.google.com ([209.85.214.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <lekktu@HIDDEN>) id 1Oc4hF-0004cO-R6
	for 6705 <at> debbugs.gnu.org; Thu, 22 Jul 2010 18:56:58 -0400
Received: by bwz7 with SMTP id 7so1304576bwz.3
	for <6705 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 15:56:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:mime-version:received:in-reply-to
	:references:from:date:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	bh=i2UOsDZPpVrkOeP4+5dPQKm1g/24cvpGXWeSAyZI61M=;
	b=xtZUsuoEDqHNp/flYJutTZ0FhxxE6hxTydpMXKMn49Dxlwu3EYgQDNb94GJsx64ko4
	hVg+aeEiyCAuUOn2XZ1l3/x0iVgDfQ7UU9Sp/SrDDgfeTkl7Ej+oOx/hD9nKnTpS2oNf
	UYF/3csws2/keErLCOJSJ/3xwyJsn2T5TOEdY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type:content-transfer-encoding;
	b=ZbQ2meIWdGaOlVlHAqv54GUFHUqcth1PUGqRgNFilexMsuKgUw0S5+9y48lTKmlrIu
	GZB9eSpL53qPVbNgBI7pdJLFT2/VFlw5K/lZ4J7gdUlb2rF3Wfe0Mrpf73jj76ssBT7o
	oqYA92xE6vOCCYnrJCtgQcHT4SLlE/ZAkNnNY=
Received: by 10.204.71.82 with SMTP id g18mr1973003bkj.82.1279839413213; Thu, 
	22 Jul 2010 15:56:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Thu, 22 Jul 2010 15:56:33 -0700 (PDT)
In-Reply-To: <83lj93cn42.fsf@HIDDEN>
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Fri, 23 Jul 2010 00:56:33 +0200
Message-ID: <AANLkTimBWvF4d6xTTjA55pYR5TNm07isPWV7B6hK3eqM@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset 
	conversion (problem description, solution/suggestion)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: =?UTF-8?Q?Laimonas_V=C4=97bra?= <laimonas.vebra@HIDDEN>,
	6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

On Thu, Jul 22, 2010 at 21:50, Eli Zaretskii <eliz@HIDDEN> wrote:

> The Windows build of Emacs doesn't yet use the UTF-16 APIs. =C2=A0Doing
> that is a large job; volunteers are welcome, of course.

What do you mean, using the W versions of API functions? That would be
incompatible with 16-bit Windows (or, at least, as compatible as the
Microsoft Layer for Unicode allows, and I wouldn't like to bet on it).
Or are you talking about abandoning 16-bit Windows compatibility?

=C2=A0 =C2=A0 Juanma




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 22 Jul 2010 20:59:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 16:59:19 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Oc2rP-0003ao-HO
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 16:59:19 -0400
Received: from mail-ew0-f44.google.com ([209.85.215.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1Oc2rN-0003ah-0U
	for 6705 <at> debbugs.gnu.org; Thu, 22 Jul 2010 16:59:17 -0400
Received: by ewy22 with SMTP id 22so3074399ewy.3
	for <6705 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 13:59:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=WLH80lulHq7w/cPOTe8dXzTgzZJ53WF7TGyTtPpCptI=;
	b=L9n56I1bXwbf9WuG+wyacKDZNkBrtUdbWBNf81Oh9upz/ki8Vekfwx4LsGGaimIwpE
	AFVV1WL7OvInQmxyig6wOAsgqoK1kzpvm0X8TGwtIiau+217vcR9aDj5QtA80XaZwYR/
	V9pDgcueoQycsipevkgpq2HTQfLs2BsWaCm4A=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	b=MWZYwV2+A0AftQ+9vM2uihWn8htT44m4M1r8IncWrwkhR5OJRDwelg6fuWmIeyQktO
	YNUITLUjKWBLrZR6SWcwfO04rLmYmLtXhnNux7MMu/VEk70lOIneJ5vYmXN5nwgDZY6t
	eHL2XZr8AqQL/bpwwfxeYQGLZQfhRA0A+ODCo=
Received: by 10.213.46.145 with SMTP id j17mr2487221ebf.37.1279832352337;
	Thu, 22 Jul 2010 13:59:12 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id
	a48sm55922324eei.13.2010.07.22.13.59.11
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 13:59:12 -0700 (PDT)
Message-ID: <4C48B11D.4050202@HIDDEN>
Date: Thu, 22 Jul 2010 23:59:09 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;	erroneous charset
	conversion (problem description,	solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <83lj93cn42.fsf@HIDDEN>
In-Reply-To: <83lj93cn42.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

Eli Zaretskii wrote:

> Sorry, I cannot understand your comments.  You talk about corrupted
> conversion, but never add any detailed explanations, just examples.
> Could you please elaborate?

That was supposed to be detailed explanations through the detailed 
examples. It is the way it happens. I did check/investigate; args that 
comes from Emacs (w32proc.c) #1, which are passed to cmdproxy #2 and -- 
after all -- what subprocess/app receives #3. Have you read that 
explanation? What part of the explanation of the corrupted conversion is 
unclear (i'll try to explain; sorry, my english is not so fluent)?

>
>    . did you try setting up your Windows to use the UTF-8 codepage
>      65001?

Well, i could switch to Linux instead...
(it is definitely not the solution or at least the same "solution" as 
not to use unicode at all; windows locale settings is what it is set (be 
it Lithuanian, Cyrillic, Italian, whatever) and is not going to be 
changed nor it needs to be for the correct behavior.

>
>    . since Cygwin 1.7 switched to using UTF-8, it parted itself even
>      further from native Windows applications, so you now have one more
>      reason to use the Cygwin build of Emacs instead of the native one

Well ok, but it (cygwin) work pretty well under/with utf-16 API layer...
(IMHO it's not the problem)

> The Windows build of Emacs doesn't yet use the UTF-16 APIs.  Doing
> that is a large job; volunteers are welcome, of course.  However,

In the context of external communication with cygwin -- it doesn't need 
to use (everywhere), but it needs to convert its output to utf-16 
explicitly and call CreateProcessW().

mingw and (possibly) other applications receives args (main(): **argv, 
GetCommanLineA()) unchanged (the same as they were passed from Emacs).
So, it (passing arguments in whatever encoding, except utf-16 and 
others, with NULL values) just works without any changes.

cygwin applications, on the other hand, receives unchanged arguments 
only through WINAPI GetCommandLineA (which is almost never used...); 
**argv args are transcoded as i explained.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 22 Jul 2010 19:50:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 15:50:56 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Oc1nD-000341-HA
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 15:50:55 -0400
Received: from mtaout23.012.net.il ([80.179.55.175])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eliz@HIDDEN>) id 1Oc1nA-00033u-5W
	for 6705 <at> debbugs.gnu.org; Thu, 22 Jul 2010 15:50:53 -0400
Received: from conversion-daemon.a-mtaout23.012.net.il by
	a-mtaout23.012.net.il (HyperSendmail v2007.08) id
	<0L5Z00L005MSCU00@HIDDEN> for
	6705 <at> debbugs.gnu.org; Thu, 22 Jul 2010 22:50:23 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout23.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L5Z00IV45RXYLA0@HIDDEN>;
	Thu, 22 Jul 2010 22:50:22 +0300 (IDT)
Date: Thu, 22 Jul 2010 22:50:21 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem
	description,	solution/suggestion)
In-reply-to: <4C483A30.9010804@HIDDEN>
To: Laimonas =?UTF-8?Q?V=C4=97bra?= <laimonas.vebra@HIDDEN>
Message-id: <83lj93cn42.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C483A30.9010804@HIDDEN>
X-Spam-Score: -0.4 (/)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

> Date: Thu, 22 Jul 2010 15:31:44 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> Cc:=20
>=20
> Below is a comment that i wrote for myself in the cmpdproxy.c (it=
=20
> explains the problem). I have a half (i suppose -- portable enough)=
 of=20
> working solution/fix for it using MultiByteToWideChar API function,=
 but=20
> i won't send a (partly working) patch, unless someone from the=20
> developers who agree with the problem and intend to fix it will ask=
 for it.

Sorry, I cannot understand your comments.  You talk about corrupted
conversion, but never add any detailed explanations, just examples.
Could you please elaborate?

The only thing I understand is that conversion of Unicode characters
to a Windows codepage that doesn't support those characters will be
lossy.  That part is clear, but:

  . did you try setting up your Windows to use the UTF-8 codepage
    65001?

  . since Cygwin 1.7 switched to using UTF-8, it parted itself even
    further from native Windows applications, so you now have one mor=
e
    reason to use the Cygwin build of Emacs instead of the native one

> Besides, the patch itself is larger than 10 diff lines and it uses=
=20
> (duplicates by copying) some helper functions/declarations=20
> (open_input_file(), close_file_data(), rva_to_section(),=20
> w32_executable_type, RVA_TO_PTR) from unexw32.c, so it may need som=
e=20
> code refactoring.

This means we will be unable to accept the patches, even if we agree
to them, without you signing legal papers assigning copyright to the
FSF.

> how do one can/should (clearly) pass utf-8 arguments to an external=
=20
> (cygwin) app on windows? I suppose, now it's not possible.

The Windows build of Emacs doesn't yet use the UTF-16 APIs.  Doing
that is a large job; volunteers are welcome, of course.  However,
passing UTF-8 arguments to subprocesses is hardly the first or the
most important thing that should be done in that regard, IMO.  File
access is much more important, this being an editor.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at 6705 <at> debbugs.gnu.org:


Received: (at 6705) by debbugs.gnu.org; 22 Jul 2010 14:33:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 10:33:09 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Obwph-0001Iq-9k
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 10:33:09 -0400
Received: from mail-pw0-f44.google.com ([209.85.160.44])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jasonrumney@HIDDEN>) id 1Obwpe-0001IQ-OH
	for 6705 <at> debbugs.gnu.org; Thu, 22 Jul 2010 10:33:07 -0400
Received: by pwj1 with SMTP id 1so3150419pwj.3
	for <6705 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 07:33:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:received:from:to:cc
	:subject:references:date:in-reply-to:message-id:user-agent
	:mime-version:content-type:content-transfer-encoding;
	bh=OZyRjgnaRS2oGh/b/QMQTL1pxnmjaYN5ud68vp26M5k=;
	b=GJoq2JNzFm/J3zikoMyISv/znmhnuxy88AmUbJ8Ifj8EGkvgKAqdK/MWtPny71gApX
	wDeGKuAeZsMn4LiQyQO90C48TCa4zg47MCcXsJl6Aa4eNYWyeoPqEOI3gYnJJI5K+yFa
	2N1pNdOXvHSVsg9m4cMIdTJwYhDEnOFcuVlsg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
	:user-agent:mime-version:content-type:content-transfer-encoding;
	b=tR1BK7WMFdI6ySLr7L4j93jKo9UAYxCk4gyu6FuaEp0anohZfPUquV2/Rbz5okILx8
	K+s85tbJ0ZQ6mtUfrzU2tyHcmE6E9xC5VO/DU3rmayd/t6vWzYrILemj2t44Kak4hzpe
	j4/BaqiNb/Zk4/xTACG1x6AZB+qXh5Eb5/czk=
Received: by 10.142.140.20 with SMTP id n20mr2338664wfd.77.1279809215177;
	Thu, 22 Jul 2010 07:33:35 -0700 (PDT)
Received: from home.jasonrumney.net ([202.87.221.130])
	by mx.google.com with ESMTPS id n2sm10476565wfl.13.2010.07.22.07.33.31
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 07:33:33 -0700 (PDT)
Received: by home.jasonrumney.net (Postfix, from userid 1000)
	id 135A49AF; Thu, 22 Jul 2010 22:33:22 +0800 (MYT)
From: Jason Rumney <jasonr@HIDDEN>
To: Laimonas =?utf-8?Q?V=C4=97bra?= <laimonas.vebra@HIDDEN>
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin;
	erroneous charset conversion (problem description,
	solution/suggestion)
References: <4C483A30.9010804@HIDDEN>
Date: Thu, 22 Jul 2010 22:33:21 +0800
In-Reply-To: <4C483A30.9010804@HIDDEN> ("Laimonas =?utf-8?Q?V=C4=97bra?=
	=?utf-8?Q?=22's?= message of "Thu, 22 Jul 2010 15:31:44 +0300")
Message-ID: <87bp9zzivi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6705
Cc: 6705 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Laimonas V=C4=97bra <laimonas.vebra@HIDDEN> writes:

> This problem certainly needs some discussion (how best to solve it) becau=
se it addresses unicode communication aspects/issues. If some won't bother =
reading all the description, then here is a simple question --=20
> how do one can/should (clearly) pass utf-8 arguments to an external
> (cygwin) app on windows? I suppose, now it's not possible.

Don't use cmdproxy with Cygwin programs. If you need a shell in between,
use Cygwin bash.  cmdproxy is a wrapper to get around some problems with
various versions of the Windows native cmd.exe and command.com shell
programs.  Mixing Cygwin and native Windows is not advised.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Jul 2010 12:31:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 08:31:33 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Obuw0-00089o-GY
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 08:31:32 -0400
Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1Obuvx-00089V-9S
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 08:31:30 -0400
Received: from lists.gnu.org ([199.232.76.165]:52119)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1ObuwQ-00029M-IJ
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 08:31:58 -0400
Received: from [140.186.70.92] (port=57276 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1ObuwO-0006rt-KX
	for bug-gnu-emacs@HIDDEN; Thu, 22 Jul 2010 08:31:58 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID,
	T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1ObuwM-0002JX-59
	for bug-gnu-emacs@HIDDEN; Thu, 22 Jul 2010 08:31:56 -0400
Received: from mail-ew0-f41.google.com ([209.85.215.41]:56720)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1ObuwL-0002J9-SI
	for bug-gnu-emacs@HIDDEN; Thu, 22 Jul 2010 08:31:54 -0400
Received: by ewy28 with SMTP id 28so3215820ewy.0
	for <bug-gnu-emacs@HIDDEN>; Thu, 22 Jul 2010 05:31:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from
	:user-agent:mime-version:to:subject:content-type
	:content-transfer-encoding;
	bh=qqLCov3j4Zk6wmL5ift0j7yModKByul4zimjCsImmVg=;
	b=jrXYmldimFc+WEXZIHGPDdKvnHKfIU5bJa2X/5N5uqrQpuZK7SVOb6dSA0i5OQ2u0P
	QzMihDB5OkzK2WHwXYDagWMMhD8J7MgoL6msyL2ak0+p3vwHNiPc9BNBs2MnUBokd6M9
	RFriHmidGWRPt4b514H+MdHIElUZVOTOp5DO0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:to:subject
	:content-type:content-transfer-encoding;
	b=ghGxXJN8ly3aX3wU9G9bOLSjWP4+IXQ4W2gJ2v85/zZJ8EAcqk1IwPyIThmTBN3cde
	ZXDFeUIMn3BgbdYb+FFlL6ZDz8jIZdtW5jEBbnyw0ac1jDK0TIhwjog8bYtCPwZ3ld4o
	lF8inAzGMuVhpRBktMUCtk9+S6yQcx86LV+Sc=
Received: by 10.213.31.134 with SMTP id y6mr7699426ebc.49.1279801911963;
	Thu, 22 Jul 2010 05:31:51 -0700 (PDT)
Received: from [192.168.2.2] (lan-84-240-35-136.vln.skynet.lt [84.240.35.136])
	by mx.google.com with ESMTPS id
	z55sm55180031eeh.15.2010.07.22.05.31.50
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 05:31:51 -0700 (PDT)
Message-ID: <4C483A30.9010804@HIDDEN>
Date: Thu, 22 Jul 2010 15:31:44 +0300
From: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion
	(problem description, solution/suggestion)
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.0 (-----)

Below is a comment that i wrote for myself in the cmpdproxy.c (it 
explains the problem). I have a half (i suppose -- portable enough) of 
working solution/fix for it using MultiByteToWideChar API function, but 
i won't send a (partly working) patch, unless someone from the 
developers who agree with the problem and intend to fix it will ask for it.

Besides, the patch itself is larger than 10 diff lines and it uses 
(duplicates by copying) some helper functions/declarations 
(open_input_file(), close_file_data(), rva_to_section(), 
w32_executable_type, RVA_TO_PTR) from unexw32.c, so it may need some 
code refactoring.

This problem certainly needs some discussion (how best to solve it) 
because it addresses unicode communication aspects/issues. If some won't 
bother reading all the description, then here is a simple question -- 
how do one can/should (clearly) pass utf-8 arguments to an external 
(cygwin) app on windows? I suppose, now it's not possible.

Thank you for your attention.


> /* When calling cygwin executable we need to explicitly convert utf-8
>    arguments (it's encoding yhat Emacs uses internally and passes args to
>    external commands, when coding-system-for-write is nil) to utf-16 and
>    call unicode (wide) API function CreateProcess(W).
>    That needs to be done, because of this transcoding chain which
>    migth (and it definitely WILL if args contains unicode, i.e. non
>    ascii/locale_charset character) result in corrupted args:
>
>    WINAPI/OS layer:
>    multibyte string args (utf-8) -> CreateProcessA():
>    locale_codepage -> unicode (utf-16)
>
>    ->
>
>    CYGWIN layer:
>    unicode (utf-16) <-> utf-8 ->
>    cygwin locale env (LC_XXX, LANG; default: C.UTF-8)
>
>
>    Example #1:
>    utf-8 string 'žą'; 'ž'(0xC5, 0xBE) 'ą'(0xC4, 0x85) transcoding
>    (to cygwin locale env charset) chain:
>
>    converting #1:
>    locale_codepage (lt, LCID: 1063, ansi/oem cp: cp1257/cp775) -> utf-16;
>
>    utf-8 string 'žą' in locale codepage (cp1257) represenation: 'žą'
>    'Å'(0xC5), '¾'(0xBE), 'Ä'(0xC4), '…'(0x85).
>
>    string converted to utf-16: 'žą'
>    U+00C5(Å), U+00BE(¾), U+00C4(Ä), U+2026(…).
>
>    utf-16: 'žą': 'Å'(U+00C5), '¾'(U+00BE), 'Ä'(U+00C4), '…'(U+2026).
>    <->
>    utf-8 : 'žą': 'Å'(0xC385), '¾'(0xC2BE), 'Ä'(0xC384), '…'(0xE280).
>
>    converting #2:
>    utf-16/utf-8 -> cygwin locale env (LANG = lt_LT.cp1257);
>
>    utf-8 string 'žą' (0xC3, 0x85, 0xC2, 0xBE, 0xC3, 0x84, 0xE2, 0x80)
>    converted to cp1257: 'žą' (0xC5, 0xBE, 0xC4, 0x85)
>
>    cp1257 string 'žą' in utf-8 representation: 'žą'; 'ž'(0xC5BE), 'ą'(0xC485)
>
>    Although string was (should be) converted to cp1257 (according to
>    cygwin locale env variables), its original value ('žą'), after transcoding
>    to cp1257 (in cp1257 representation as it should be), is corrupted and indeed
>    passed args are (were preserved) in utf-8 encoding.
>    It's important to note that such "original value preservation" happens
>    only because of successful circumstances, when we are converting to windows
>    locale codepage/charset and arg string (utf-8) in  windows locale
>    representation doesn't result in some unconvertible character/combination
>    (e.g. undefined characters) and it's possible to convert back (from utf-16/utf-8
>    to locale charset). Corruption _always_ occurs  if we ar converting to other 	
>    codepage/charset than the current windows locale codepage.
>
>    Consider unsuccessful/erroneous conversion example:
>    utf-8 string/character 'ĥ' (U+0125) passed to cygwin (utf-8):
>
>    utf-8 string 'ĥ'(0xC4A5) in locale codepage (cp1257) representation: 'Ä'
>    (0xA5('') is undefined in cp1257 and it doesn't map to unicode)
>
>    converting #1:
>    locale_codepage (lt, LCID: 1063, ansi/oem cp: cp1257/cp775) -> utf-16;
>
>    utf-8 string 'ĥ' in cp1257 representation: 'Ä'
>
>    string converted to utf-16: 'Ä' (0x00C4, 0xF8FD)
>    (http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1257.txt)
>    0xA5 (cp1257) is mapped to 0xF8FD in Unicode (Private Use Area Range: E000–F8FF)
>
>    utf-16: 'Ä': 'Ä'(U+00C4), ''(U+F8FD)
>    <->
>    utf-8 : 'Ä': 'Ä'(0xC384), ''(0xEFA3BD)
>
>    converting #2:
>    utf-16/utf-8 -> cygwin locale env (LANG = C.UTF-8);
>
>
>    utf-16 string 'Ä': 'Ä'(U+00C4), ''(U+F8FD)
>    converted to utf-8: 'Ä': 'Ä'(0xC384), ''(0xEFA3BD)
>
>    So, original string value 'ĥ' is transcoded to an invalid 'Ä' although that
>    shouldn't happen (as no conversion is supposed; neither implicitly, nor
>    explicitly)
>
>
>    Concluding all: erroneous conversion _always_ occurs, when we are converting
>    to codepage/charset other than the current windows locale codepage, although
>    corruption might occur even if we are not supposed to convert at all
>    (just pass utf-8 encoded arguments).
>
>
> */




Acknowledgement sent to Laimonas Vėbra <laimonas.vebra@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6705; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.