Messages in this thread | | | Date | Mon, 16 Feb 2004 22:04:42 +0000 | From | Jamie Lokier <> | Subject | Re: stty utf8 |
| |
Jamie Lokier wrote: > perl -e 'for (glob "*") { rename $_, "ņi-".$_ or die "rename: $!\n"; }' > > (NB: The prefix string is N WITH CEDILLA followed by "i-"). > (Hint: it mangles perfectly fine non-ASCII file names). > > Perl has no perfect behaviour to offer, because what should that > behaviour be if readdir() might return a non-UTF-8 byte sequence > as a name?
I've had someone point out that the perl script mangles non-UTF-8 filenames, and there is no correct behaviour for that case.
In fact the _real_ bug is that it mangles perfectly fine UTF-8 filenames.
It's a Perl quirk, but the behaviour is like that for compatibility with non-UTF-8 filesystems. I wanted to show how just using UTF-8 for filenames isn't _yet_ as straightforward as it should be.
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |