in reply to Re^3: Can't Find File When Non-ASCII Letters Appear in Path
in thread Can't Find File When Non-ASCII Letters Appear in Path

I had never heard of that. Worst still, I have never worked with utf-16. This is my first attempt:
#!/usr/bin/perl -w use strict; use Unicode::String qw(utf8 latin1 utf16); my $u = utf8("C:\\&#913;&#957;&#964;&#943;&#947;&#961;&#945;&#966;&#95 +9;\\VOLINFO.TXT"); my $file = $u->utf16; open FILE, $file or die "can't open $file: $!"; while (<FILE>) { } close FILE;
I only got this incomplete reaction from activeperl: can't open

Replies are listed 'Best First'.
Re^5: Can't Find File When Non-ASCII Letters Appear in Path
by samtregar (Abbot) on Apr 16, 2007 at 19:46 UTC
    You're not really using HTML entities, right? So what are you using? If you're trying to enter the characters in a text editor that might not work. Try using Perl escapes - like "\x080" - to construct your string.

    Also, did you try my readdir() suggestion? I still think it could help...

    -sam

      Thanks again for the reply, Sam.

      Of course, I'm not using html entities. ;-)

      Yes, I tried your readdir() suggestion but the problem is that as non-ASCII characters appear in the path, I get a similar error message (directory not found, etc).
        Work your way back up the path. Surely there's a directory on your filesystem you can read which contains non-ASCII entries, even if it's C:\!

        -sam