Re: [Bug-tar] Wildcards do not match invalid characters

2008-02-07 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Micah Cowan wrote: > This would > end up doing the right thing if the locale is UTF-8 but the input string > is in ISO-8859-1. Er, if the locale is UTF-8 or similar and wide characters are using native-order Unicode to represent their values in wchar_

Re: [Bug-tar] Wildcards do not match invalid characters

2008-02-07 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bruno Haible wrote: > Any volunteer wants to write a 'mbsfnmatch' function that works like fnmatch > but supports invalid byte sequences? (I've removed bug-tar from the Cc list but left everyone else; I hope that's as it should be.) Wget is in need o

Re: [Bug-tar] Wildcards do not match invalid characters

2008-02-07 Thread Bruno Haible
Sergey Poznyakoff wrote: > > ... fnmatch() indeed returns -1, which means an > > error happened and perror() says "Invalid or incomplete multibyte > > or wide character". ... > > Thanks for reporting. I am not sure what exclude_fnmatch is supposed > to return on error, since it returns bool, so I'

Re: [Bug-tar] Wildcards do not match invalid characters

2008-02-07 Thread Sergey Poznyakoff
jlh <[EMAIL PROTECTED]> ha escrit: > Ok, here's an update. I could track down the cause of this > problem. In order to match file names to patterns, tar uses the > fnmatch(3), which is provided by glibc. This happens in > lib/exclude.c:149:exclude_fnmatch(). fnmatch() is documented to > return