Subject: Re: bug#6705: w32 cmdproxy.c pass args to cygwin; erroneous charset conversion (problem description, solution/suggestion)

From: Eli Zaretskii <[email-masked]>
Date: Fri, 23 Jul 2010 17:35:27 +0300

> Date: Fri, 23 Jul 2010 15:57:46 +0300
> From: Laimonas Vėbra <[email-masked]>
> CC: [email-masked]
> 
> It's not the problem to pass utf-8 arguments to natvive (mingw)
> apps.

If these MinGW applications use Unicode (UTF-16) APIs, that's true.
But if they use the ANSI APIs (and most of them do), then you simply
cannot pass to them command-line arguments encoded in any encoding
other than the current codepage.

> I'd like to grep for some utf-8 encoded string.

Stop.  That's your problem, right there: you can't have this, not
unless your current codepage is 65001.

> > I didn't try to imply that Cygwin was the problem.  I was suggesting
> > to use the Cygwin build of Emacs.  Why do you insist on using the
> > native w32 build, when it is obvious that the compatibility between
> > what it does and what Cygwin expects is marginal at best?
> 
> I tried to imply, that cygwin tools is mature/consistent enough for the 
> w32 to work with.

Mature, but incompatible with the w32 build of Emacs.  And Cygwin 1.7
made them even more incompatible.

> In other words -- (why) do you think it's not worth to tune Emacs with 
> cygwin system (plenty of useful tools; especially if we think about 
> working (efficiently, the same) with emacs on different systems: *nix, w32)?

In my view, users of the w32 build of Emacs who use Cygwin tools
outside Emacs are a minority.  There are native w32 ports of most of
the tools you have in Cygwin, and there is the Cygwin build of Emacs.
I don't see why the handful of Emacs developers who contribute to the
w32 port should invest a significant part of their scarce resources on
fixing incompatibilities between the w32 Emacs and Cygwin, when a
Cygwin build of Emacs is available and works pretty well, judging by
the few of its users who are active on the emacs-devel list.  I don't
know why you say it's "potentially" more buggy -- it uses mostly the
same code that runs on GNU/Linux, so actually it should be _less_
buggy than the native w32 build, because it is used by a larger number
of users.  Did you even try to switch to the Cygwin build?  If not,
perhaps you should.