This is the mail archive of the
mailing list for the Cygwin project.
Re: 1.7.1: unable to run the a bash script resides in chinese path using: c:\cygwin\bin\bash --login script.
> C:\cygwin\bin\bash --login "%~dp0myscript"
> Preferred POSIX equivalent is: "F:/zhaohs/Desktop/éççéåå/myscript"
> /usr/bin/bash: "F:\zhaohs\Desktop\æææç\myscript": No such file or
Looks like there's some sort of GBK vs UTF-8 mixup going on, because
'éççéåå' is the same byte sequence in GBK as 'æææç' is in UTF-8:
I take it the actual directory name is 'æææç'? (Babelfish seems to be
able to make some sense of that one but not the other.)
Do you know what the encoding of your batch file is? And have you got
any locale variables (LC_ALL, LC_CTYPE, LANG) set when invoking it?
>>C:\cygwin\bin\bash --login "%~dp0myscript"
> I've found a more strange thing: If I change the batch file into the
> following form, then it will be run smoothly:
> @echo off
> C:\cygwin\bin\bash --login %~dp0myscript
> The QUOTATION MARK in the former is used to deal with the whitespaces
> appearing in the myscript's pathname, though this is relatively rare
> case. ÂBut in the latter case, if there're whitespaces in the
> myscript's pathname, the batch will fail to run.
Hmm, perhaps the argument mangling at program startup is using the
ANSI codepage (i.e. GBK in this case) when it should be using UTF-8?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple