On Wed, Dec 30, 2009 at 01:30:19PM -0500, Christopher Faylor wrote: >On Wed, Dec 30, 2009 at 05:36:05PM +0100, Bengt Larsson wrote: >>I seem to have a problem with wildcards from the Windows command line >>when there are high-bit characters in a filename. >> >>A directory contains only the two files "user" and "anv?ndare" >>("anv?ndare" being user in Swedish): >> >> C:\Documents and Settings\Bengt2\Desktop\test\ttt>ls -l >> total 0 >> -rw-r--r-- 1 Bengt2 Users 0 2009-12-30 02:23 anv?ndare >> -rw-r--r-- 1 Bengt2 Users 0 2009-12-30 02:23 user >> >> C:\Documents and Settings\Bengt2\Desktop\test\ttt>ls u* >> user >> >> C:\Documents and Settings\Bengt2\Desktop\test\ttt>ls a* >> ls: cannot access a*: No such file or directory > >I get a different (and slightly more understandable) error >(not sure how this will translate to my email client from vnc): > >c:\tmp> ls a* >ls: cannot access anvA?ndare: No such file or directory >autoruns.chm autoruns.exe autorunsc.exe > >I'm not really familiar with all of the changes that Corinna made >for this but I'll take a look to see if this is easy to fix.
It looks like things should work better if you set LANG appropriately. For instance, this works for me: c:\>set LANG=en_US.UTF-8 c:\>ls a* What's happening is that cygwin's readdir is converting the on-disk filename to utf-8 but cygwin's open/stat apparently aren't converting it back. As I said, I don't know enough about the labyrinthian multi-byte character set code that is now in cygwin but I really can't see how this could be anything other than a bug. If readdir() returns a filename then open should be able to open it. cgf -- 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