unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Laimonas Vėbra" <laimonas.vebra@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 6705@debbugs.gnu.org
Subject: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description,	solution/suggestion)
Date: Thu, 22 Jul 2010 23:59:09 +0300	[thread overview]
Message-ID: <4C48B11D.4050202@gmail.com> (raw)
In-Reply-To: <83lj93cn42.fsf@gnu.org>

Eli Zaretskii wrote:

> Sorry, I cannot understand your comments.  You talk about corrupted
> conversion, but never add any detailed explanations, just examples.
> Could you please elaborate?

That was supposed to be detailed explanations through the detailed 
examples. It is the way it happens. I did check/investigate; args that 
comes from Emacs (w32proc.c) #1, which are passed to cmdproxy #2 and -- 
after all -- what subprocess/app receives #3. Have you read that 
explanation? What part of the explanation of the corrupted conversion is 
unclear (i'll try to explain; sorry, my english is not so fluent)?

>
>    . did you try setting up your Windows to use the UTF-8 codepage
>      65001?

Well, i could switch to Linux instead...
(it is definitely not the solution or at least the same "solution" as 
not to use unicode at all; windows locale settings is what it is set (be 
it Lithuanian, Cyrillic, Italian, whatever) and is not going to be 
changed nor it needs to be for the correct behavior.

>
>    . since Cygwin 1.7 switched to using UTF-8, it parted itself even
>      further from native Windows applications, so you now have one more
>      reason to use the Cygwin build of Emacs instead of the native one

Well ok, but it (cygwin) work pretty well under/with utf-16 API layer...
(IMHO it's not the problem)

> The Windows build of Emacs doesn't yet use the UTF-16 APIs.  Doing
> that is a large job; volunteers are welcome, of course.  However,

In the context of external communication with cygwin -- it doesn't need 
to use (everywhere), but it needs to convert its output to utf-16 
explicitly and call CreateProcessW().

mingw and (possibly) other applications receives args (main(): **argv, 
GetCommanLineA()) unchanged (the same as they were passed from Emacs).
So, it (passing arguments in whatever encoding, except utf-16 and 
others, with NULL values) just works without any changes.

cygwin applications, on the other hand, receives unchanged arguments 
only through WINAPI GetCommandLineA (which is almost never used...); 
**argv args are transcoded as i explained.





  reply	other threads:[~2010-07-22 20:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 12:31 bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion) Laimonas Vėbra
2010-07-22 14:33 ` Jason Rumney
2010-07-22 18:14   ` bug#6546: " Laimonas Vėbra
2010-07-22 19:50 ` Eli Zaretskii
2010-07-22 20:59   ` Laimonas Vėbra [this message]
2010-07-23 10:21     ` Eli Zaretskii
2010-07-23 12:57       ` Laimonas Vėbra
2010-07-23 14:35         ` Eli Zaretskii
2010-07-23 15:35           ` Laimonas Vėbra
2010-07-23 18:06             ` Eli Zaretskii
2010-07-23 18:53               ` Laimonas Vėbra
2010-07-23 21:25                 ` Eli Zaretskii
2010-07-23 21:53                   ` Laimonas Vėbra
2010-07-24 20:33                     ` Eli Zaretskii
2010-07-25 10:10                       ` Laimonas Vėbra
2010-07-23 19:07             ` Juanma Barranquero
2010-07-23 19:51               ` Laimonas Vėbra
2010-07-23 19:59                 ` Juanma Barranquero
2010-07-22 22:56   ` Juanma Barranquero
2010-07-23 10:26     ` Eli Zaretskii
2010-07-23 10:45       ` Juanma Barranquero
2010-07-23 14:16         ` Eli Zaretskii
2010-07-25 23:38           ` Stefan Monnier

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=4C48B11D.4050202@gmail.com \
    --to=laimonas.vebra@gmail.com \
    --cc=6705@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).