GNU bug report logs - #6546
win32 grep/shell utf-8 encoding

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 #6705; dated Thu, 1 Jul 2010 08:48:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 19:07:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 15:07:28 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 1OcNai-0006Jd-K0
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:07:28 -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 1OcNah-0006JY-KG
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 15:07:28 -0400
Received: by eyb7 with SMTP id 7so115353eyb.3
	for <6546 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 12:07:25 -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=gbSMTAMEvt/fFsMejkbWrheAlRVrjE1wGnYQk0hg3sc=;
	b=pFBaEiZOdkQ8C2RG2sYWYGgpJV9zBjeYk8gfwdWfCj/wK+alBn/o8O5idTy2i1P+vq
	1JoGTc2Tguzo8nuL9GCyMdMmxFSf0AxCe7090BLcbe9eulhPBkPmXH5Jfi/CfleR8HCJ
	xH2EH/vi2T5q5Es0xxzRG/lL3oSXM/Yc9KIhY=
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=YYrukMB1e4MyuLIQHySfqR3mRlv2WqyO3oGTOTcPZlzDe2iz+r/pzO22FEZ0CwWnAs
	CkHE8wtjf0KuKgFGKrGOg/rKj+eJCiRVqbOGbD+co7LjSD+9+1M8tnVM08LSAJIAW8kx
	37CJwFqALDAwFutvcut+2scnoYuMDT6AKsg0Q=
Received: by 10.213.31.148 with SMTP id y20mr3606844ebc.39.1279912044871;
	Fri, 23 Jul 2010 12:07:24 -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 a48sm833016eei.19.2010.07.23.12.07.24
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 12:07:24 -0700 (PDT)
Message-ID: <4C49E864.7010306@HIDDEN>
Date: Fri, 23 Jul 2010 22:07:16 +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#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN> <83zkxits1p.fsf@HIDDEN>
	<4C49910A.2010209@HIDDEN> <83r5iutgy4.fsf@HIDDEN>
	<4C49BA5E.6080101@HIDDEN> <83hbjqt6hw.fsf@HIDDEN>
In-Reply-To: <83hbjqt6hw.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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:50:54 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> CC: 6546 <at> debbugs.gnu.org
>>
>> Eli Zaretskii wrote:
>>
>>> You cannot easily change the locale of a Windows system by specifying
>>> some environment variable.  You need to actually switch it
>>> system-wide.  As long as we use ANSI APIs on Windows, we can only
>>
>> I am talking about LANG env settings, which we can freely change for the
>> cygwin apps to act differently (as we need).
>
> You are talking about Cygwin programs, while I'm talking about the
> native w32 build of Emacs.  The effect of LANG and the way to change
> the locale is different for each one of these two.

I am talking about LANG setting restrictions, that Emacs implies. I 
think -- it shouldn't.

>
>>> You can't, sorry.
>>
>> You can. That example was supposed to show, that you can freely change
>> LANG variable and cygwin utils, which relies on it, acts appropriately.
>
> Again, I was not talking about Cygwin, I was talking about the native
> w32 build of Emacs.  It doesn't use the Unicode (UTF-16) APIs, so it
> can only support the current codepage when it invokes programs through
> the Windows APIs.

It *can* (try mingw example, that i posted) pass utf-8 encoded (and in 
other encodings) arguments when it invokes external programs and for 
that it doesn't need to use UTF-16 API _everywhere_. Like i said -- now 
it (perfectly) works with native/mingw apps without any change.





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

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 18:10:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 14:10:15 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 1OcMhL-0005te-0b
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:10:15 -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 1OcMhI-0005tZ-PN
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 14:10:13 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0L6000I00VQRJ300@HIDDEN> for
	6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 21:09:32 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000HNZVRVVB30@HIDDEN>;
	Fri, 23 Jul 2010 21:09:32 +0300 (IDT)
Date: Fri, 23 Jul 2010 21:09:31 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
In-reply-to: <4C49BA5E.6080101@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83hbjqt6hw.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN> <83zkxits1p.fsf@HIDDEN>
	<4C49910A.2010209@HIDDEN> <83r5iutgy4.fsf@HIDDEN>
	<4C49BA5E.6080101@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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:50:54 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6546 <at> debbugs.gnu.org
>=20
> Eli Zaretskii wrote:
>=20
> > You cannot easily change the locale of a Windows system by specif=
ying
> > some environment variable.  You need to actually switch it
> > system-wide.  As long as we use ANSI APIs on Windows, we can only
>=20
> I am talking about LANG env settings, which we can freely change fo=
r the=20
> cygwin apps to act differently (as we need).

You are talking about Cygwin programs, while I'm talking about the
native w32 build of Emacs.  The effect of LANG and the way to change
the locale is different for each one of these two.

> > You can't, sorry.
>=20
> You can. That example was supposed to show, that you can freely cha=
nge=20
> LANG variable and cygwin utils, which relies on it, acts appropriat=
ely.

Again, I was not talking about Cygwin, I was talking about the native
w32 build of Emacs.  It doesn't use the Unicode (UTF-16) APIs, so it
can only support the current codepage when it invokes programs throug=
h
the Windows APIs.

> So, i'm asking the same question again -- why do you think it's not=
=20
> worth to fix this Emacs setup restriction in order to work with cyg=
win=20
> apps like it's intended from cygwin/cmd shell (setting on the fly a=
s=20
> needed whatever supported locale)?

I already answered that.  I have nothing to add to what I said.





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

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 15:51:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 11:51:02 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 1OcKWc-0004pb-5N
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 11:51:02 -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 1OcKWa-0004pO-OY
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 11:51:01 -0400
Received: by eyb7 with SMTP id 7so76563eyb.3
	for <6546 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 08:50:58 -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=jpVOxbKUJq7BpALjQjLZW1mRkEJ1JGKAtqKdoF/Qi80=;
	b=w6IwfsehDYyMto55MUU0puKX2t8vYuBt3BWlW0gnvlrtkuEEfBlLdRzJBlfHWPhFJ5
	xLnMMbdABKn9uytQoYzttuBPJe3jN4Xtlzn9PCvhz2OuR0o3iioOGjQi4RJ/pIgl4BYB
	gsxlXX4ahCUD5pSIZdghlW6WIflpIfNWzHxx4=
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=Dc24Lnp4iShmxjLHIPfMLpn7WQL7IBbgAaNicVjBamOB7WgQU8YEc07B31MM3dGNxZ
	eMBbB4Maybj8miXnUbQ/T8udHKEpYZ99Az7jB72JczwHhJG5MysSOW4sBW/kiyjq6rJh
	eln7cec87W0HmF3HX/Dr6dcYG6YTK6TR63+Do=
Received: by 10.213.113.12 with SMTP id y12mr3387898ebp.53.1279900258044;
	Fri, 23 Jul 2010 08:50:58 -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 a48sm574191eei.18.2010.07.23.08.50.57
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 08:50:57 -0700 (PDT)
Message-ID: <4C49BA5E.6080101@HIDDEN>
Date: Fri, 23 Jul 2010 18:50:54 +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#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN> <83zkxits1p.fsf@HIDDEN>
	<4C49910A.2010209@HIDDEN> <83r5iutgy4.fsf@HIDDEN>
In-Reply-To: <83r5iutgy4.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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:

> You cannot easily change the locale of a Windows system by specifying
> some environment variable.  You need to actually switch it
> system-wide.  As long as we use ANSI APIs on Windows, we can only

I am talking about LANG env settings, which we can freely change for the 
cygwin apps to act differently (as we need).

> You can't, sorry.

You can. That example was supposed to show, that you can freely change 
LANG variable and cygwin utils, which relies on it, acts appropriately.

Well, you can't change it freely in the sense of Emacs setup 
("workaround"), which requires, that LANG should be set the same as the 
current system locale in order for the Emacs to pass 
unicode/non-system-encoding args.

So, i'm asking the same question again -- why do you think it's not 
worth to fix this Emacs setup restriction in order to work with cygwin 
apps like it's intended from cygwin/cmd shell (setting on the fly as 
needed whatever supported locale)?




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

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 14:33:55 +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-0004F2-TM
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:33:55 -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 1OcJJx-0004Er-Sj
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 10:33:54 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L6000M00L9NPD00@HIDDEN> for
	6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 17:23:48 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000CP9LBMZQO0@HIDDEN>;
	Fri, 23 Jul 2010 17:23:48 +0300 (IDT)
Date: Fri, 23 Jul 2010 17:23:47 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
In-reply-to: <4C49910A.2010209@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83r5iutgy4.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN> <83zkxits1p.fsf@HIDDEN>
	<4C49910A.2010209@HIDDEN>
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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:54:34 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6546 <at> debbugs.gnu.org
>=20
> >> The only way it works is when i set LANG process-environment var=
iable to
> >> the current windows locale codepage and 'coding-system-for-write=
' to the
> >> encoding/charset in which i'd like to grep.
> >
> > That's the only way it's _supposed_ to work.
>=20
> Then i suppose it's wrong/incorrect way of what is supposed to oper=
ate=20
> like that.
>=20
> Why? Because for the correct behaviour we (external app, Emacs)=
=20
> shouldn't require to set locale to some fixed setting; it should be=
=20
> freely changed as many cygwin apps relies on that.

You cannot easily change the locale of a Windows system by specifying
some environment variable.  You need to actually switch it
system-wide.  As long as we use ANSI APIs on Windows, we can only
support a single Windows locale, and that locale must be the current
user's locale.

> For example, how do you sort data with improper locale settings
> (which are required to be fixed)?

You can't, sorry.

> > Yes, this is the only setup that is supposed to work.
>=20
> Maybe it is/was suppose to work (at all) like that in the sense of=
=20
> workaround, but i doubt if it was/is supposed to be correct.

It cannot work in any other way with ANSI APIs.





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

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 12:54:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 08:54:44 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 1OcHly-0003Ug-Vu
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 08:54:43 -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 1OcHlw-0003Ua-TD
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 08:54:41 -0400
Received: by ewy22 with SMTP id 22so69018ewy.3
	for <6546 <at> debbugs.gnu.org>; Fri, 23 Jul 2010 05:54:37 -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=jkgisT3MGCljWC7QyIq12uWP8vpERqLuQ+qupLUB/i0=;
	b=ILg2x/Sq7hIyj/Z0q9eBP1zsTgtq5E9rf+IjX0HTEwu1ByAjk8XgfiyZPGxRs2S8Tx
	gnC3ITL/Y/92DxW1fLZ/eWPUgm8cssG8us8j7KUk510TVBTznAc5VKnvvipmE9fZr6EL
	HVGTIuZ2+on7XaO7xeUNtH2WoxdDdYtt8inPA=
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=TdDscDBGoL6RXfFly8OB37v2QFvDUITFB9YfwHU+qf1CWoSXEcbwZ/bPzZd+S1wJXf
	CY70Ebhhlmw+IqSsgXIL6qANEcxgOjgpusQxfeGQ2MZb+0O7gJfBwBrnQmuY4A4cjY4B
	+Nywi3KVP8Mgkbgw41DouRursrQpuehFmu31c=
Received: by 10.213.15.197 with SMTP id l5mr529632eba.95.1279889677870;
	Fri, 23 Jul 2010 05:54:37 -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 a48sm346592eei.1.2010.07.23.05.54.37
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Fri, 23 Jul 2010 05:54:37 -0700 (PDT)
Message-ID: <4C49910A.2010209@HIDDEN>
Date: Fri, 23 Jul 2010 15:54:34 +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#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN> <83zkxits1p.fsf@HIDDEN>
In-Reply-To: <83zkxits1p.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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 00:48:28 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> CC: 6546 <at> debbugs.gnu.org
>>
>>> Did you try to add a suitably-valued LANG variable to
>>> process-environment?  That would at least force Cygwin executables to
>>> work in the Windows codepage.
>>
>> The only way it works is when i set LANG process-environment variable to
>> the current windows locale codepage and 'coding-system-for-write' to the
>> encoding/charset in which i'd like to grep.
>
> That's the only way it's _supposed_ to work.

Then i suppose it's wrong/incorrect way of what is supposed to operate 
like that.

Why? Because for the correct behaviour we (external app, Emacs) 
shouldn't require to set locale to some fixed setting; it should be 
freely changed as many cygwin apps relies on that. For example, how do 
you sort data with improper locale settings (which are required to be 
fixed)? Will seek for another workaround?

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

$ export LANG=lt_LT.cp1257
$ cat file.txt
-Ä”ÄæÄ°-
_Ä”ÄæÄ°_
ELI
Ä”ÄæÄ°

$ cat file.txt | sort
_Ä”ÄæÄ°_
Ä”ÄæÄ°
-Ä”ÄæÄ°-
ELI

$ export LANG=lt_LT.utf-8
$ cat file.txt
-ĔĿİ-
_ĔĿİ_
ELI
ĔĿİ

$ cat file.txt | sort
_ĔĿİ_
ELI
ĔĿİ
-ĔĿİ-

> Yes, this is the only setup that is supposed to work.

Maybe it is/was suppose to work (at all) like that in the sense of 
workaround, but i doubt if it was/is supposed to be correct.





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

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


Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 10:24:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 23 06:24: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 1OcFQR-0001gp-Hj
	for submit <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:24:19 -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 1OcFQO-0001gj-P8
	for 6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 06:24:17 -0400
Received: from conversion-daemon.a-mtaout20.012.net.il by
	a-mtaout20.012.net.il (HyperSendmail v2007.08) id
	<0L60001009MOME00@HIDDEN> for
	6546 <at> debbugs.gnu.org; Fri, 23 Jul 2010 13:24:04 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout20.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L6000IQ1A8196J0@HIDDEN>;
	Fri, 23 Jul 2010 13:24:02 +0300 (IDT)
Date: Fri, 23 Jul 2010 13:24:02 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
In-reply-to: <4C48BCAC.6040101@HIDDEN>
To: =?UTF-8?B?TGFpbW9uYXMgVsSXYnJh?= <laimonas.vebra@HIDDEN>
Message-id: <83zkxits1p.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN>
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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: Fri, 23 Jul 2010 00:48:28 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> CC: 6546 <at> debbugs.gnu.org
>=20
> > Did you try to add a suitably-valued LANG variable to
> > process-environment?  That would at least force Cygwin executable=
s to
> > work in the Windows codepage.
>=20
> The only way it works is when i set LANG process-environment variab=
le to=20
> the current windows locale codepage and 'coding-system-for-write' t=
o the=20
> encoding/charset in which i'd like to grep.

That's the only way it's _supposed_ to work.

> That way it works, but i'm not sure (seriously doubt) if LANG/local=
e=20
> codepage, which differs from the actual args encoding, won't result=
 in=20
> any ugly problems/bugs (e.g. sorting, piping to other apps)

You should set LANG to the current codepage and make sure
locale-coding-system is set to the same codepage.  Then the Cygwin
programs invoked as Emacs subprocesses should do what you expect.

> If it really won't and this setup is "as it should be, intended", t=
hen=20
> this bug could be closed.

Yes, this is the only setup that is supposed to work.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6546; 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 6546 <at> debbugs.gnu.org:


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 23:00:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 19:00:47 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 1Oc4kx-0004el-8F
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 19:00:47 -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 1Oc4ku-0004ef-Py
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 19:00:45 -0400
Received: by bwz7 with SMTP id 7so1305980bwz.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 16:00:40 -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=bZ/zXS+DOXwe3xlZSzHsHcbo0flwquuPKuJy3fP5L4M=;
	b=dIP9ESNE2PvcLLvTj3rpuoBxDg3ImZ+oGFLqSmQQrNF1NGwVILxfKZH8FhSrf8SuPV
	VxLFohOwS7ylfbZ6ZNFUC73d9v95s9XZefaaEC1/aav4tc+B3jPZEfHO0b5PnqjzWrpz
	OenYwyk2ZXNhj2EqRW4n2zWQfjhvJ1QJDio74=
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=htEySxexQjnd5PLCOf18Kx4yk1Mo4o5lhNUW4D4tx2ow5A7qRgJLU5VQ0tYfqD6H2d
	ySgSKJxU0EWP9rGs7RzjvqWCYJkI6uTk5JwpJX7EcUGQMdYM06P6WYZNZ+91+IGZZHsE
	DZPm5T1AIkR7xtcgk8lMax5kppb9rI+zIdnvc=
Received: by 10.204.82.136 with SMTP id b8mr2070467bkl.38.1279839640178; Thu, 
	22 Jul 2010 16:00:40 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Thu, 22 Jul 2010 16:00:20 -0700 (PDT)
In-Reply-To: <4C48BCAC.6040101@HIDDEN>
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN> 
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN> 
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
	<4C48BCAC.6040101@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Fri, 23 Jul 2010 01:00:20 +0200
Message-ID: <AANLkTikMcwgaFG9J9W2WCBp_qi6n1MJV0XxZWftMamMw@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
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: 6546
Cc: Eli Zaretskii <eliz@HIDDEN>, 6546 <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 23:48, Laimonas V=C4=97bra <laimonas.vebra@HIDDEN=
m> wrote:

> How can i do that?

You can send a message to control <at> debbugs.gnu.org, starting with

merge 6705 6546
quit

If both bugs aren't in the same state (open/closed, etc.), you can use
"forcemerge" instead.

Control commands for debbugs are documented in the file admin/notes/bugtrac=
ker.

=C2=A0 =C2=A0 Juanma




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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 21:48:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 17:48:37 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 1Oc3d7-00040J-9J
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 17:48:37 -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 1Oc3d5-00040C-IY
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 17:48:36 -0400
Received: by eyb7 with SMTP id 7so2052929eyb.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 14:48:31 -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=yE65ZIX7tBwqotcUJRhCRABdgtW9nRHD0O1mB4yu60g=;
	b=uyxmt3es9jKUpfbJsqVz4Tb6k6MeR0kKIOfI6nMoxmruVs+VF33vB4WXYkh6djDe7y
	785e75vGdm5AGDPohUe39vgl99wy/Zkdoi3IJjGwJVTlQUyEE/C2VXSlgZoAicd9/Naw
	hFhUxEKFAHPRpmU+/Q1VTFfWZ7LaR9OySEHkg=
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=p3Z462S0VnEOiYWLPw6rjEtOeUZLeg+Or/g8jj4J8OnZEFI5RgLZQumRir+Vhb7yzj
	bxUMdMmI3a5MXTcgJu/hMboM6C2+j1Nn10YSuLdZOYwOrWdeAMuDMZ7WXX0W2xQi/Npi
	tVr80+4/azvlntTFrCiwC1rHrjRrQesq8jhK0=
Received: by 10.213.10.195 with SMTP id q3mr2538045ebq.29.1279835310846;
	Thu, 22 Jul 2010 14:48: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
	x54sm55952970eeh.23.2010.07.22.14.48.30
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 14:48:30 -0700 (PDT)
Message-ID: <4C48BCAC.6040101@HIDDEN>
Date: Fri, 23 Jul 2010 00:48: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>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN> <83k4oncmyp.fsf@HIDDEN>
In-Reply-To: <83k4oncmyp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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:
>> Date: Thu, 22 Jul 2010 21:24:12 +0300
>> From: Laimonas Vėbra<laimonas.vebra@HIDDEN>
>> Cc: 6546 <at> debbugs.gnu.org
>>
>> The problem is not here. I can change the encoding of the command string
>> (which is passed to external cygwin apps) using
>> coding-system-for-write. It works (converted correctly utf-8->cp1257,
>> cp1251, etc), but it doesn't help, because of the way the args (command
>> line) are passed/transcoded through the winapi (CreateProcessA) and
>> cygwin layer.
>
> Did you try to add a suitably-valued LANG variable to
> process-environment?  That would at least force Cygwin executables to
> work in the Windows codepage.

The only way it works is when i set LANG process-environment variable to 
the current windows locale codepage and 'coding-system-for-write' to the 
encoding/charset in which i'd like to grep.
That way it works, but i'm not sure (seriously doubt) if LANG/locale 
codepage, which differs from the actual args encoding, won't result in 
any ugly problems/bugs (e.g. sorting, piping to other apps)
If it really won't and this setup is "as it should be, intended", then 
this bug could be closed.


>> This bug is related to bug#6705 (there are detailed description of
>> what's happening)
>
> Then please merge them.

How can i do that?




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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 19:55:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 15:55: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 1Oc1r8-00035w-VJ
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 15:54:59 -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 1Oc1r6-00035p-Tv
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 15:54:57 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L5Z006005W7O700@HIDDEN> for
	6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 22:53:36 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L5Z004OH5XA4470@HIDDEN>;
	Thu, 22 Jul 2010 22:53:35 +0300 (IDT)
Date: Thu, 22 Jul 2010 22:53:34 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
In-reply-to: <4C488CCC.6080107@HIDDEN>
To: Laimonas =?UTF-8?Q?V=C4=97bra?= <laimonas.vebra@HIDDEN>
Message-id: <83k4oncmyp.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
	<4C488CCC.6080107@HIDDEN>
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: 6546
Cc: lekktu@HIDDEN, 6546 <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 21:24:12 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> Cc: 6546 <at> debbugs.gnu.org
>=20
> The problem is not here. I can change the encoding of the command s=
tring=20
> (which is passed to external cygwin apps) using
> coding-system-for-write. It works (converted correctly utf-8->cp125=
7,=20
> cp1251, etc), but it doesn't help, because of the way the args (com=
mand=20
> line) are passed/transcoded through the winapi (CreateProcessA) and=
=20
> cygwin layer.

Did you try to add a suitably-valued LANG variable to
process-environment?  That would at least force Cygwin executables to
work in the Windows codepage.

> This bug is related to bug#6705 (there are detailed description of=
=20
> what's happening)

Then please merge them.





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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 18:24:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 14:24:25 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 1Oc0RV-0001fn-1l
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 14:24:25 -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 1Oc0RT-0001fh-8x
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 14:24:23 -0400
Received: by ewy22 with SMTP id 22so3014720ewy.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 11:24:18 -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=RfhzyGff3pzbL6iv/8x91Aaf2Oqz6DyLC0/qSydBZiU=;
	b=wF6ihKn2UN8/FWgwVODsWd47DU1yoUPeULYn+3CCMGeSKZWUvmN2Jt5OHG4N2wLBD1
	20/XW8QZUMuZbtazRuRL/6Y1cOmSEUmb4LT3V38sw9Xz95K9K02w9KRnahwbx9jNDWDj
	QinBkKF1rdY8a+1OvBluJRBsGp3ukhdmQBYEc=
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=G3t2x4h11lQQI8hhNl+Jzz8U+eRlBk9B2lN2b5m2WFGeV71/ycnkpI2PB8LesxMXWW
	3TaMiaiE+KjnoVGTcf/Dch5NWWpTznAJwz6GCWgxOzphB5JdhNcOl3AyuTuokz0dQmqr
	yNo4qvjHSaqi6BBoi/olLBYw82zez8YmRYxqI=
Received: by 10.213.108.203 with SMTP id g11mr8345563ebp.51.1279823057913;
	Thu, 22 Jul 2010 11:24:17 -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
	a48sm55681324eei.18.2010.07.22.11.24.16
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 11:24:16 -0700 (PDT)
Message-ID: <4C488CCC.6080107@HIDDEN>
Date: Thu, 22 Jul 2010 21:24:12 +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: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
	<4C485199.7020501@HIDDEN>
	<AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
In-Reply-To: <AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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: -3.0 (---)

Juanma Barranquero wrote:
> On Thu, Jul 22, 2010 at 16:11, Laimonas Vėbra<laimonas.vebra@HIDDEN>  wrote:
>
>> That means you are using gnu-win32 grep. Some older (2.5.4) and newer
>> (2.6.3) cygwin greps won't work.
>
> Sorry, I missed that in your original report.
>
> Did you try adding an entry to `process-coding-system-alist'?

The problem is not here. I can change the encoding of the command string 
(which is passed to external cygwin apps) using
coding-system-for-write. It works (converted correctly utf-8->cp1257, 
cp1251, etc), but it doesn't help, because of the way the args (command 
line) are passed/transcoded through the winapi (CreateProcessA) and 
cygwin layer.
This bug is related to bug#6705 (there are detailed description of 
what's happening)




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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 18:14:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 14:14:17 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 1Oc0Hh-0001Xv-Kd
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 14:14:17 -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 1Oc0Hf-0001Xq-GW
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 14:14:16 -0400
Received: by eyb7 with SMTP id 7so2014653eyb.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 11:14:10 -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:cc:subject:references:in-reply-to
	:content-type:content-transfer-encoding;
	bh=KDvzU3J7r7COTojeGmgNQg43X8RovHcS/j3TPMQ5ZSY=;
	b=XxlVUCf6h4GYSKS809yHOLtc0batkuX/gf9KO5dBpA9uXbAg5ii3cC1pwR+AkhZGJF
	vrPNEDhw37KjfWDTQJc6GVvvHMVIeBQcikG2uSeNH4IropXoZzSjSp5uqokK00yxavfP
	3yBkt4YOruVKZA/kFUQYSunc5mz1o3ZBb2At0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:user-agent:mime-version:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	b=pzypyur7B293BM1T08OCDITa8JyeCnvt0rAD26VEyfJSHKUI13zmB6qC6quLf8cIKB
	5szzdty/m9XMM99HRZo+bEUeCn9Wvjw8eBLwXpClq4FbtZku8vUOjVJ5ui1URCQafwwP
	8iYo4u+ET45OREMaO54njKvHYAJ8JL1Yp5Vt4=
Received: by 10.213.32.135 with SMTP id c7mr2349370ebd.2.1279822450457;
	Thu, 22 Jul 2010 11:14:10 -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 v8sm55711047eeh.2.2010.07.22.11.14.09
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 11:14:10 -0700 (PDT)
Message-ID: <4C488A70.6030007@HIDDEN>
Date: Thu, 22 Jul 2010 21:14:08 +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
Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset
	conversion (problem description, solution/suggestion)
References: <4C483A30.9010804@HIDDEN> <87bp9zzivi.fsf@HIDDEN>
In-Reply-To: <87bp9zzivi.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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.5 (--)

Jason Rumney wrote:

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

That doesn't solve the problem (try to pass utf-8 string from Emacs to 
cygwin/bin/(ba)sh.exe or any other cygwin app), nor it anyhow 
complicates the matter (cmdproxy just passes commandline to 
CreateProcess(); same happens in w32proc.c calling /bin/sh instead of 
cmdproxy.exe). The problem is not cmdproxy itself, but winapi/cygwin 
layer and the way the args are passed/transcoded using CreateProcess(A) 
-> cygwin layer.




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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 15:02:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 11:02:44 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 1ObxIJ-0001XG-Qo
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 11:02:44 -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 1ObxIH-0001X9-El
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 11:02:41 -0400
Received: by bwz7 with SMTP id 7so1003384bwz.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 08:03:10 -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=5HZonO+/fqrIL3BbmpYEBKxycXFi0LbSfY6ooaYLhG8=;
	b=n4McBMyC59dU3dPEnqYV2TQ6zi1HnhFsa3HChvyoW+jSE0U0d9jXvgkWXgmP61KPm5
	sqxb16369x8xGpQAsFYhFJPm/gCRlLKDr/GFz7Sx5QlHZ2OkMrI8heQqU8R2LpI9bTML
	t0J+rsNm+eefmquXp6AMx85cxwEPOZGtUM5Yo=
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=hVrGlfCTiZC0RIgL51d0PiyiMrBHdNamcI1YPtPnrplx9PlnVMDwHbQN73kRVQy5SF
	zQeMiE9AOONeeXTLIlnjmQNxqAxGsQnD/6kRY8GGsLe7E/YmV1ELP2TRDnm9HO4zt4Zg
	IL5+DBNsQ9DAR34E1quPk4TRJKoNLmhX1Ofp4=
Received: by 10.204.81.39 with SMTP id v39mr1416591bkk.149.1279810990188; Thu, 
	22 Jul 2010 08:03:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Thu, 22 Jul 2010 08:02:50 -0700 (PDT)
In-Reply-To: <4C485199.7020501@HIDDEN>
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN> 
	<4C485199.7020501@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Thu, 22 Jul 2010 17:02:50 +0200
Message-ID: <AANLkTikgtx07iUhJN0IJq7b0W9uMl8ivXxURAOvc74BN@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
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: 6546
Cc: 6546 <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 16:11, Laimonas V=C4=97bra <laimonas.vebra@HIDDEN=
m> wrote:

> That means you are using gnu-win32 grep. Some older (2.5.4) and newer
> (2.6.3) cygwin greps won't work.

Sorry, I missed that in your original report.

Did you try adding an entry to `process-coding-system-alist'?

=C2=A0 =C2=A0 Juanma




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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 14:11:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 10:11:13 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 1ObwUT-00017w-1V
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 10:11:13 -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 1ObwUR-00017p-AS
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 10:11:11 -0400
Received: by ewy22 with SMTP id 22so2855093ewy.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 07:11:40 -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=xmJ53occ/dTP4bkhBtP3Cd5qLw2T4LGkOBNGskvLWB0=;
	b=dyrJYmEHsJ4iORtuMaNk/f8LB9y09qVHZ5CBwOwUEFusNBt71WhKkLRLf9LY0oEKTk
	t9VKRb5rznH+rGshqB5gO+OA6ChCbjlLbnXGpMkzA8G7nv08o8e0gLzWGoemX86DxnGs
	3WnSsNsfWk4+kakRawA8S9ejKUesqs6o1U1FI=
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=QyDH/lvwRfxIj1EZiNmocB6wdRQ3S5170jfkjby7SFkUDOU+7fVRWk0U4JrrNDmCXo
	GRwrAh6mcwF8HCk8tu1HL7v2r3VeLc/Gjrwb45exdW4qJXVIoI8/mCyVkChy7aOi+Ckh
	7rX7f2oCw27o0nZbMDgabF5d6o8leCqo+URdQ=
Received: by 10.213.19.7 with SMTP id y7mr8096770eba.25.1279807899806;
	Thu, 22 Jul 2010 07:11:39 -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
	x54sm55302450eeh.17.2010.07.22.07.11.39
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 22 Jul 2010 07:11:39 -0700 (PDT)
Message-ID: <4C485199.7020501@HIDDEN>
Date: Thu, 22 Jul 2010 17:11:37 +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: Juanma Barranquero <lekktu@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN>
	<AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
In-Reply-To: <AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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: -3.4 (---)

Juanma Barranquero wrote:

> --------------------------------
> Cyrillic follows:
> ЁШејҘҘ
> --------------------------------
>
> M-x grep<RET>  ШејҘ 6546.txt<RET>
>
> =>
>
> -*- mode: grep; default-directory: "c:/emacs/repo/" -*-
> Grep started at Thu Jul 22 14:46:58
>
> grep -nH -e ШејҘ 6546.txt
> 6546.txt:2:ЁШејҘҘ
>
> Grep finished (matches found) at Thu Jul 22 14:46:58
>
>
> so I cannot reproduce it. Could you please send a step-by-step recipe,
> starting from emacs -Q?

That means you are using gnu-win32 grep. Some older (2.5.4) and newer 
(2.6.3) cygwin greps won't work.

I don't believe cygwin grep (and other app) is going to be fixed/coded 
like (gnu-win32 app), because it's a matter how arguments are passed 
through winapi->cygwin (whole system) layers.

Besides, older (2.5.x) greps doesn't correctly color (multibyte) matches 
(try grep -nH -e 'Ш*' 6546.txt)





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

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


Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 12:50:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 22 08:50:16 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 1ObvE7-0008LG-FV
	for submit <at> debbugs.gnu.org; Thu, 22 Jul 2010 08:50:15 -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 1ObvE4-0008LB-Qw
	for 6546 <at> debbugs.gnu.org; Thu, 22 Jul 2010 08:50:14 -0400
Received: by bwz7 with SMTP id 7so903341bwz.3
	for <6546 <at> debbugs.gnu.org>; Thu, 22 Jul 2010 05:50:41 -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=ILdIqqYcYf1oql0WOuo08Sx/mSPwz2TaNQZdVh/CtEQ=;
	b=L7Zm/pd5yUPjq/Nq5EZ+K+clP/csMDvJ8qr5aMsmU7lTi8Ca6Mep8P1r/T1+wOs20k
	Bn12vGN01TlYjO4yZpxs2Iq3oTElBkY8FrCtF8eATGR5aQIbRLQno+zCeM4tRKv2M7de
	i6fHzUvVXGaVB4nBNkJbs0mjTXplgI7OUcyxc=
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=msMKIwwXOZstVVE5zlTDi3yzNAuZ8LM2iItr9End8b1UwScAmYHWSztNLrjQ1vnMBx
	LViS14Tmv47MqukACTNMHoCPLvQyzWeGWw3n7uicqkCeMpjGB4R6bdvnrBhsb/MhNuEO
	cYhzROna5qrz73K57Bx1ESFw6V1Icl82Q6e6s=
Received: by 10.204.129.83 with SMTP id n19mr1352048bks.128.1279803041168; 
	Thu, 22 Jul 2010 05:50:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.204.180.136 with HTTP; Thu, 22 Jul 2010 05:50:21 -0700 (PDT)
In-Reply-To: <4C2C55ED.3020207@HIDDEN>
References: <4C2C55ED.3020207@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Thu, 22 Jul 2010 14:50:21 +0200
Message-ID: <AANLkTiksr6KIr2R-rLzI77TKpWKqHhWkNzq7JjHT3RNX@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
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: 6546
Cc: 6546 <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 1, 2010 at 10:46, Laimonas V=C4=97bra <laimonas.vebra@HIDDEN=
> wrote:

> Create utf-8 file with some unicode characters (Cyrillic, Baltic, whateve=
r;
> not only ascii) and try to grep for some utf-8 strings from Emacs (M-x
> grep).

File 6546.txt (in utf-8, no BOM):

--------------------------------
Cyrillic follows:
=D0=81=D0=A8=D0=B5=D1=98=D2=98=D2=98
--------------------------------

M-x grep <RET> =D0=A8=D0=B5=D1=98=D2=98 6546.txt<RET>

=3D>

-*- mode: grep; default-directory: "c:/emacs/repo/" -*-
Grep started at Thu Jul 22 14:46:58

grep -nH -e =D0=A8=D0=B5=D1=98=D2=98 6546.txt
6546.txt:2:=D0=81=D0=A8=D0=B5=D1=98=D2=98=D2=98

Grep finished (matches found) at Thu Jul 22 14:46:58


so I cannot reproduce it. Could you please send a step-by-step recipe,
starting from emacs -Q?

Thanks,

=C2=A0 =C2=A0 Juanma




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

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


Received: (at 6546) by debbugs.gnu.org; 1 Jul 2010 18:05:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 01 14:05:45 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 1OUO8v-0004kz-K3
	for submit <at> debbugs.gnu.org; Thu, 01 Jul 2010 14:05:45 -0400
Received: from mail-wy0-f172.google.com ([74.125.82.172])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OUO8u-0004kt-5m
	for 6546 <at> debbugs.gnu.org; Thu, 01 Jul 2010 14:05:44 -0400
Received: by wyg36 with SMTP id 36so237855wyg.3
	for <6546 <at> debbugs.gnu.org>; Thu, 01 Jul 2010 11:05:39 -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=zLrit152zurlZ9TgLKHVIXGBDLIvyq2TWtEA2Gy7iOE=;
	b=a42ILGuVC2Y6X0J8RwnWeJFp6b0YAQqVDh2kiXVOM+KZxpwAVV2dt6P8KugUhrhVMH
	ltcm9ocmYiZgUmHkZidwvOLG/O5gM++jDY7zr/H2NAVyoS4fq5A4jtTaNbTGhsBU5QFi
	zMOV3qIWlXdGFvDeOOMr1+DkSqvUAn97o8Gms=
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=REgBbR1sy5yzW0ZLtqcsV7GyYs8rYm/kiOkxzLQK1Li1SjswqZg1pt95rHV+5DZlNW
	C9BxqvZ28Bg56AEWnZkXos/1loGJjMBERzyQNnQHd5IQaxKRCNy7TWSMxJdfzJ8hUrpt
	DcoqhdQrykr9IciQFqnnrys/Z9IYbkYddPXac=
Received: by 10.213.30.9 with SMTP id s9mr5967599ebc.5.1278007539003;
	Thu, 01 Jul 2010 11:05:39 -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 v8sm12217792eeh.2.2010.07.01.11.05.37
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 01 Jul 2010 11:05:38 -0700 (PDT)
Message-ID: <4C2CD8F0.90103@HIDDEN>
Date: Thu, 01 Jul 2010 21:05:36 +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.9) Gecko/20100317 SeaMonkey/2.0.4
MIME-Version: 1.0
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
References: <4C2C55ED.3020207@HIDDEN> <83hbkj9kql.fsf@HIDDEN>
In-Reply-To: <83hbkj9kql.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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: -3.7 (---)

Eli Zaretskii wrote:

> Did you try set-process-coding-system?

No, but is't it coding-system-for-(read|write) that specifies 
(synchronous) subprocess input|output coding system?
And how do i suppose to do that (set-process-coding-system) a priori 
(when no process exist yet) for a single grep command which executes and 
returns (process terminates)?




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

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


Received: (at 6546) by debbugs.gnu.org; 1 Jul 2010 17:24:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 01 13:24:28 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 1OUNUy-0004KT-00
	for submit <at> debbugs.gnu.org; Thu, 01 Jul 2010 13:24:28 -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 1OUNUv-0004KO-Bt
	for 6546 <at> debbugs.gnu.org; Thu, 01 Jul 2010 13:24:26 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
	a-mtaout22.012.net.il (HyperSendmail v2007.08) id
	<0L4W000002ZBVK00@HIDDEN> for
	6546 <at> debbugs.gnu.org; Thu, 01 Jul 2010 20:24:20 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([84.229.12.240]) by a-mtaout22.012.net.il
	(HyperSendmail v2007.08) with ESMTPA id
	<0L4W00MOF30JTT30@HIDDEN>;
	Thu, 01 Jul 2010 20:24:20 +0300 (IDT)
Date: Thu, 01 Jul 2010 20:26:26 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#6546: win32 grep/shell utf-8 encoding
In-reply-to: <4C2C55ED.3020207@HIDDEN>
To: Laimonas =?UTF-8?Q?V=C4=97bra?= <laimonas.vebra@HIDDEN>
Message-id: <83hbkj9kql.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: QUOTED-PRINTABLE
X-012-Sender: halo1@HIDDEN
References: <4C2C55ED.3020207@HIDDEN>
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 6546
Cc: 6546 <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.9 (-)

> Date: Thu, 01 Jul 2010 11:46:37 +0300
> From: Laimonas V=C4=97bra <laimonas.vebra@HIDDEN>
> Cc:=20
>=20
> Maybe it's actually not the bug (but missing functionality), but ho=
w do=20
> one should/could setup ones emacs && .emacs to grep files in utf-8=
=20
> encoding?
>=20
> grep 2.6.3 (cygwin) at last works correctly (coloring multibyte mat=
ches)=20
> from win32 console (according to LANG environment settings), but no=
=20
> matter how i've tried to push emacs (set-language-environment,=20
> coding-system-for-(read|write), set-env in grep-setup-hook), it jus=
t=20
> don't work, because somewhere inside the Emacs win32 stuff it stick=
s to=20
> windows locale codepage and tries hard to convert to this=20
> codepage/encoding before it passes arguments to shell. No wonder --=
 it=20
> fails when it comes to unicode.

Did you try set-process-coding-system?





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

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


Received: (at submit) by debbugs.gnu.org; 1 Jul 2010 08:47:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 01 04:47:02 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 1OUFQD-0000SD-S4
	for submit <at> debbugs.gnu.org; Thu, 01 Jul 2010 04:47:02 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OUFQB-0000S1-U8
	for submit <at> debbugs.gnu.org; Thu, 01 Jul 2010 04:47:00 -0400
Received: from lists.gnu.org ([199.232.76.165]:59848)
	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 1OUFQ9-0000Jr-4V
	for submit <at> debbugs.gnu.org; Thu, 01 Jul 2010 04:46:57 -0400
Received: from [140.186.70.92] (port=33731 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OUFQ4-0001yM-KC
	for bug-gnu-emacs@HIDDEN; Thu, 01 Jul 2010 04:46:56 -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 1OUFQ0-0001Tq-C0
	for bug-gnu-emacs@HIDDEN; Thu, 01 Jul 2010 04:46:52 -0400
Received: from mail-fx0-f41.google.com ([209.85.161.41]:52078)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <laimonas.vebra@HIDDEN>) id 1OUFQ0-0001Tc-0g
	for bug-gnu-emacs@HIDDEN; Thu, 01 Jul 2010 04:46:48 -0400
Received: by fxm17 with SMTP id 17so1167112fxm.0
	for <bug-gnu-emacs@HIDDEN>; Thu, 01 Jul 2010 01:46: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:subject:content-type
	:content-transfer-encoding;
	bh=VJiPp7NfgOqHPqZs8lbus1bQmJIi5ebv7OauO12aq6I=;
	b=FK7QRgZXX6DrTC2iNW2E1Nv3wXP9TEicqycFmpiCnMWQhSNnDSVoNJa1E5y9DgYndu
	KGkVZkJi4k5PnC4lPjltniqVe8V+xhnnthuLeuIuoVXDqlPWq1PvlIkcnPch9vZMGT0F
	vxAxRPnnH8oMgWfUX9rkHgr4iXvjDR/fHv160=
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=HwEc4YoZ5ATfBy+UFQiMPb6G1DMCw8oRjfE+6UDyvV0P1QczsLAOwMddw3YC+LTtlv
	e7WiNmrZeNBoZCDyv39d3BXC0mJV4JC55dAJCLAacHZhlnaX1X4z62e901w5U/wtgG6h
	J7qlWlPBNIJGZu/1S7EEM9UIzk3TfRHenylkA=
Received: by 10.102.243.26 with SMTP id q26mr3598787muh.34.1277974001035;
	Thu, 01 Jul 2010 01:46:41 -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
	j10sm1317021muh.58.2010.07.01.01.46.40
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Thu, 01 Jul 2010 01:46:40 -0700 (PDT)
Message-ID: <4C2C55ED.3020207@HIDDEN>
Date: Thu, 01 Jul 2010 11:46:37 +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.9) Gecko/20100317 SeaMonkey/2.0.4
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: win32 grep/shell utf-8 encoding 
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
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: -5.9 (-----)
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.9 (-----)

Maybe it's actually not the bug (but missing functionality), but how do 
one should/could setup ones emacs && .emacs to grep files in utf-8 
encoding?

grep 2.6.3 (cygwin) at last works correctly (coloring multibyte matches) 
from win32 console (according to LANG environment settings), but no 
matter how i've tried to push emacs (set-language-environment, 
coding-system-for-(read|write), set-env in grep-setup-hook), it just 
don't work, because somewhere inside the Emacs win32 stuff it sticks to 
windows locale codepage and tries hard to convert to this 
codepage/encoding before it passes arguments to shell. No wonder -- it 
fails when it comes to unicode.

How to reproduce:

Create utf-8 file with some unicode characters (Cyrillic, Baltic, 
whatever; not only ascii) and try to grep for some utf-8 strings from 
Emacs (M-x grep).




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#6546; 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.