From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6546: win32 grep/shell utf-8 encoding Date: Fri, 23 Jul 2010 17:23:47 +0300 Message-ID: <83r5iutgy4.fsf@gnu.org> References: <4C2C55ED.3020207@gmail.com> <4C485199.7020501@gmail.com> <4C488CCC.6080107@gmail.com> <83k4oncmyp.fsf@gnu.org> <4C48BCAC.6040101@gmail.com> <83zkxits1p.fsf@gnu.org> <4C49910A.2010209@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1279895864 14809 80.91.229.12 (23 Jul 2010 14:37:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 23 Jul 2010 14:37:44 +0000 (UTC) Cc: 6546@debbugs.gnu.org To: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 23 16:37:42 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OcJNc-0002PS-1A for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 16:37:40 +0200 Original-Received: from localhost ([127.0.0.1]:37793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcJNb-0005uX-Fe for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 10:37:39 -0400 Original-Received: from [140.186.70.92] (port=35556 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcJNS-0005tJ-7z for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 10:37:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcJNQ-00073r-Uv for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 10:37:30 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33700) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcJNQ-00073n-Rx for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2010 10:37:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OcJK5-0004FM-RF; Fri, 23 Jul 2010 10:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2010 14:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6546 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6546-submit@debbugs.gnu.org id=B6546.127989563516313 (code B ref 6546); Fri, 23 Jul 2010 14:34:01 +0000 Original-Received: (at 6546) by debbugs.gnu.org; 23 Jul 2010 14:33:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcJJy-0004F2-TM for submit@debbugs.gnu.org; Fri, 23 Jul 2010 10:33:55 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcJJx-0004Er-Sj for 6546@debbugs.gnu.org; Fri, 23 Jul 2010 10:33:54 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L6000M00L9NPD00@a-mtaout22.012.net.il> for 6546@debbugs.gnu.org; Fri, 23 Jul 2010 17:23:48 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.61.30]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6000CP9LBMZQO0@a-mtaout22.012.net.il>; Fri, 23 Jul 2010 17:23:48 +0300 (IDT) In-reply-to: <4C49910A.2010209@gmail.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 23 Jul 2010 10:34:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38823 Archived-At: > Date: Fri, 23 Jul 2010 15:54:34 +0300 > From: Laimonas V=C4=97bra > CC: 6546@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.