-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ondrej Bilka on 5/14/2009 7:47 AM: > Hello, > I realized my fnmatch implementation contains this bug: > For encodings like BIG5 if character contains / it could quit prematurely. > I fixed it by ingoring FNM_PATHNAME till check phase. > But as I looked how it is handled in basename.c it isnt handled at all. glibc > basename too ignores this.
You'd have to convince glibc that this is a bug, first. Really, file names are just byte strings where / is special, and not character encodings dependent on your locale (except on Mac, and look at the problems that caused). BIG5 is a lousy character encoding for the very reason that it confuses common ASCII bytes with encoded characters, depending on shift state. But kernel calls that operate on file names, and thus library operations like basename that prepare file names for use in kernel calls, are locale-agnostic. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkoM7KQACgkQ84KuGfSFAYB4awCfRQAV8TeSg9Rby8hTtZ94VS0d wEwAn2i5UpExEVPEa+z5B5qcJBqt9TfT =ricZ -----END PGP SIGNATURE-----