[lkml]   [2004]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean