unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 28180@debbugs.gnu.org
Subject: bug#28180: [w32] Unicode characters in subprocess (git) arguments changed to space
Date: Mon, 28 Aug 2017 20:15:46 +0300	[thread overview]
Message-ID: <83bmmz4nr1.fsf@gnu.org> (raw)
In-Reply-To: <CAM-tV--3p_JKL5d+65BvMR2pMS97wfH9-ZVNW3DR2tPf4AObJQ@mail.gmail.com> (message from Noam Postavsky on Mon, 28 Aug 2017 10:42:14 -0400)

> From: Noam Postavsky <npostavs@users.sourceforge.net>
> 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?





  reply	other threads:[~2017-08-28 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22  2:35 bug#28180: [w32] Unicode characters in subprocess (git) arguments changed to space npostavs
2017-08-22 14:54 ` Eli Zaretskii
2017-08-28 14:42   ` Noam Postavsky
2017-08-28 17:15     ` Eli Zaretskii [this message]
2017-08-29 22:06     ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bmmz4nr1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=28180@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).