From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Laimonas =?UTF-8?Q?V=C4=97bra?= Newsgroups: gmane.emacs.bugs Subject: bug#6546: win32 grep/shell utf-8 encoding Date: Fri, 23 Jul 2010 00:48:28 +0300 Message-ID: <4C48BCAC.6040101@gmail.com> References: <4C2C55ED.3020207@gmail.com> <4C485199.7020501@gmail.com> <4C488CCC.6080107@gmail.com> <83k4oncmyp.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1279836537 12662 80.91.229.12 (22 Jul 2010 22:08:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 22 Jul 2010 22:08:57 +0000 (UTC) Cc: 6546@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 23 00:08:52 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 1Oc3wh-0008TB-9N for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 Jul 2010 00:08:51 +0200 Original-Received: from localhost ([127.0.0.1]:36228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oc3wf-00032Y-LK for geb-bug-gnu-emacs@m.gmane.org; Thu, 22 Jul 2010 18:08:49 -0400 Original-Received: from [140.186.70.92] (port=42696 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oc3wQ-00030V-7t for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2010 18:08:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oc3vG-00042d-P4 for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2010 18:07:23 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38368) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oc3vG-00042X-MQ for bug-gnu-emacs@gnu.org; Thu, 22 Jul 2010 18:07:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Oc3dV-00040b-ID; Thu, 22 Jul 2010 17:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Laimonas =?UTF-8?Q?V=C4=97bra?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2010 21:49: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.127983531815398 (code B ref 6546); Thu, 22 Jul 2010 21:49:01 +0000 Original-Received: (at 6546) by debbugs.gnu.org; 22 Jul 2010 21:48:38 +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 1Oc3d7-00040J-9J for submit@debbugs.gnu.org; Thu, 22 Jul 2010 17:48:37 -0400 Original-Received: from mail-ey0-f172.google.com ([209.85.215.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oc3d5-00040C-IY for 6546@debbugs.gnu.org; Thu, 22 Jul 2010 17:48:36 -0400 Original-Received: by eyb7 with SMTP id 7so2052929eyb.3 for <6546@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= Original-Received: by 10.213.10.195 with SMTP id q3mr2538045ebq.29.1279835310846; Thu, 22 Jul 2010 14:48:30 -0700 (PDT) Original-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) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 In-Reply-To: <83k4oncmyp.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 22 Jul 2010 17:49: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:38790 Archived-At: Eli Zaretskii wrote: >> Date: Thu, 22 Jul 2010 21:24:12 +0300 >> From: Laimonas VÄ—bra >> Cc: 6546@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?