X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Wed, 3 Jun 2009 18:17:11 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.0-48: [BUG] Passing characters above 128 from bash command 	line
Message-ID: <20090603161711.GD22513@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4A204149.2050009@sidefx.com> <e2480c70905291337g6c8bcca7xd0baba79c84629db@mail.gmail.com> <4A2051E5.6060600@sidefx.com> <20090602205440.GF23519@calimero.vinschen.de> <4A26782C.9040207@sidefx.com> <20090603142755.GM23519@calimero.vinschen.de> <4A268C22.8070305@sidefx.com> <20090603154919.GA22513@calimero.vinschen.de> <4A269E70.5050605@sidefx.com> <20090603161231.GC23419@calimero.vinschen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20090603161231.GC23419@calimero.vinschen.de>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jun  3 18:12, Corinna Vinschen wrote:
> On Jun  3 12:01, Edward Lam wrote:
> > Corinna Vinschen wrote:
> >> No.  I'm suggesting to convert the command line always using the default
> >> ANSI codepage, same as Windows when calling CreateProcessA.  This only
> >> affects non-Cygwin processes anyway since Cygwin uses another mechanism
> >> to send the command line arguments to the child process.
> >
> > Wouldn't that necessarily break non-Cygwin processes that are UTF-16 aware?
> 
> How?  They get the commnd line in UTF-16 anyway.

Ok, I found a problem.  Assuming the argument is a valid filename in
UTF-8 encoding, as it's the default when using LANG=C.  If we try to
convert this string using the ANSI codepage, the native child process
will get a malformed filename as argument.  Looks like always using the
ANSI codepage is not exactly a good solution...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

