X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 7 Jan 2010 13:19:04 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problem with wildcard from Windows Message-ID: <20100107121904.GE23972@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20091230183019 DOT GC17448 AT ednor DOT casa DOT cgf DOT cx> <20091230224240 DOT GA24986 AT ednor DOT casa DOT cgf DOT cx> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20091230224240.GA24986@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) 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 On Dec 30 17:42, Christopher Faylor wrote: > 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. Looks like this problem has been fixed in the latest developer snapshot from http://cygwin.com/snapshots/ Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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