Cygwin programs doesn't support non-ASCII filenames

Tue May 12 14:43:00 GMT 2009

On 2009-5-12 16:30, Corinna Vinschen wrote:
> On May 12 15:49, Lenik wrote:
>> I'd like to know if there is any build plan to upgrade tools like d,
>> zip, unzip, jar, etc. to support locale settings, rather than C only. So
>> I can tell customers when our cygwin-based scripts will work for Chinese
>> path names.
> That depends on the package maintainers and it will certainly not be
> done within just a couple of days.  After all, the Cygwin distro is
> a volunteer effort.
> Corinna

Is there any hint on how to add locale support to existing packages at 
source code level? I guess that a specific package maintainer maybe work 
on a central version, so any change to `grep' or `unzip' for example, 
will be applied on that central version, so various distros like RHEL, 
Ubuntu, etc. can share the same changement? If so that is, my changement 
on `grep' may be required to be test/return-test on the various distros, 
and only if the package maintainer considers the changement won't break 
the consistency between the various distros, he will then accept the 
changes and release it to the cygwin? If I changed a specific package in 
cygwin distro, I shall send to that specific package maintainer, right?

And I still think it may be better to add locale support in cygwin 
layer(maybe it's not enabled by default, though), if you write a program 
operates with path names, (most programs access files) you won't do 
anything about locale settings in common sense, and I didn't see there 
is necessary to setlocale or somewhat before fopen/fstat() operations in 
that famous APUX book.

     C:\Profiles\Shecti> set LANG=zh_CN.GBK& cat 你好

     C:\Profiles\Shecti> set LANG=C& cat 你好

     C:\Profiles\Shecti> set LANG=& cat 你好
     cat: 你好: No such file or directory

The default LANG isn't C neither GBK in codepage 936, I guess it is set 
to GB2312, but I'm not sure. How can I know the default LANG?


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list