in reply to utf8 filenames

I would be interested into hearing if the Encode sub in Re: problems with extended ascii characters in filenames works for you.

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: utf8 filenames
by Anonymous Monk on Apr 10, 2006 at 18:16 UTC
    use Encode; ex("c:\\fil\x{e9}.txt"); ex("c:\\fil" . chr(0xc3) . chr(0xa9) . ".txt"); ex("c:\\fil" . pack("U", 0xe9 ) . ".txt"); sub ex { my $f2 = shift; my $f = $f2; print $f; print ((-e $f) ? " exists" : " doesn't exist"); print "\n"; my $f = Encode::decode( 'utf8', $f2); print $f; print ((-e $f) ? " exists" : " doesn't exist"); print "\n\n"; }
    Procudes:
    c:\filé.txt exists Wide character in print at C:\ex.pl line 16. c:\fil�.txt doesn't exist c:\filé.txt doesn't exist c:\filé.txt doesn't exist c:\filé.txt doesn't exist Wide character in print at C:\ex.pl line 16. c:\fil�.txt doesn't exist