X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20100220091710.GI5683@calimero.vinschen.de> References: <416096c61002191229x670cbb63gf5c693056af727a2 AT mail DOT gmail DOT com> <416096c61002200000r549264c4tfdf46a9b71700bc AT mail DOT gmail DOT com> <20100220091710 DOT GI5683 AT calimero DOT vinschen DOT de> Date: Sat, 20 Feb 2010 09:29:48 +0000 Message-ID: <416096c61002200129ya3246d4u221bd6a796593027@mail.gmail.com> Subject: Re: 1.7.1: unable to run the a bash script resides in chinese path using: c:\cygwin\bin\bash --login script. From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Corinna Vinschen: >> Anyway, I had a look into why the dosfilewarning prints the wrong >> filename: it calls small_sprintf to print the message, and >> small_sprintf uses the ANSI version of WriteFile to write to >> STD_ERROR_HANDLE, so it ends up interpreting a UTF-8 string as GBK. >> Seems sys_mbstowcs and WriteFileW are needed there. > > There's no such thing as a WriteFileW function. D'oh, of course. I confused it with WriteConsole, which does have a Unicode version. Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple