bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28180: [w32] Unicode characters in subprocess (git) arguments change


From: Noam Postavsky
Subject: bug#28180: [w32] Unicode characters in subprocess (git) arguments changed to space
Date: Mon, 28 Aug 2017 10:42:14 -0400

On Tue, Aug 22, 2017 at 10:54 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> As to the "other places", the only problem I'm aware of is that the
> encoding of the command-line arguments, when they arrive at w32proc.c,
> is not known in advance, so this must be somehow fixed/changed,
> otherwise we will be unable to re-encode them in UTF-16.  I believe
> the comment in w32.c does mention that.

Just to understand the issue better, I applied the attached diff to
use CreateProcessW. 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.

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?

Attachment: CreateProcessW.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]