delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/07/07:19:25

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 <corinna-cygwin AT cygwin DOT com>
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: <bivmj55gng57ut1ei2e1in1hufms1h90ri AT 4ax DOT com> <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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019