From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28180: [w32] Unicode characters in subprocess (git) arguments changed to space Date: Mon, 28 Aug 2017 20:15:46 +0300 Message-ID: <83bmmz4nr1.fsf@gnu.org> References: <87d17oba8j.fsf@users.sourceforge.net> <83y3qbabzw.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1503940637 5552 195.159.176.226 (28 Aug 2017 17:17:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2017 17:17:17 +0000 (UTC) Cc: 28180@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 28 19:17:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmNes-0000ni-Rx for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 19:17:07 +0200 Original-Received: from localhost ([::1]:40750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmNex-0005ue-VC for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Aug 2017 13:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmNes-0005uN-Gu for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 13:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmNeo-0002T2-HN for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 13:17:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50919) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmNeo-0002Se-DX for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 13:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmNeo-0003L2-52 for bug-gnu-emacs@gnu.org; Mon, 28 Aug 2017 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Aug 2017 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28180 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28180-submit@debbugs.gnu.org id=B28180.150394057310378 (code B ref 28180); Mon, 28 Aug 2017 17:17:02 +0000 Original-Received: (at 28180) by debbugs.gnu.org; 28 Aug 2017 17:16:13 +0000 Original-Received: from localhost ([127.0.0.1]:59600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmNe0-0002h2-Go for submit@debbugs.gnu.org; Mon, 28 Aug 2017 13:16:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmNdz-0002at-3R for 28180@debbugs.gnu.org; Mon, 28 Aug 2017 13:16:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmNdp-0000CF-V0 for 28180@debbugs.gnu.org; Mon, 28 Aug 2017 13:16:05 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmNdp-0000Bt-RY; Mon, 28 Aug 2017 13:16:01 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4267 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dmNdo-0002US-1V; Mon, 28 Aug 2017 13:16:01 -0400 In-reply-to: (message from Noam Postavsky on Mon, 28 Aug 2017 10:42:14 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136297 Archived-At: > From: Noam Postavsky > Date: Mon, 28 Aug 2017 10:42:14 -0400 > Cc: 28180@debbugs.gnu.org > > Just to understand the issue better, I applied the attached diff to > use CreateProcessW. I hope you realize that this is just a quick hack, which cannot work in general, yes? For starters, the command line is not a file name, in general, so using filename_to_utf16 is inappropriate. Also, I think the environment variables need to be converted to UTF-16. > It seemed to work, but only when I start emacs from mingw's msys > shell. When running from cmd.exe it still translates to space. What exactly did you run from cmd.exe? What command? > Furthermore, when I run an unpatched Emacs from the msys shell, the > output of the test I posted above is different: > > (call-process "git" nil '(t t) nil > "-c" "alias.x=!x() { printf '%s' \"$1\" | od -tx1; }; x" > "x" "(好)") > 0000000 28 c3 a5 c2 a5 c2 bd 29 > 0000010 > > Do you have any idea what setting could cause this? Windows tries to interpret UTF-8 as something else?