in reply to Re^2: opening accented file names
in thread opening accented file names
I included the CHCP command in my post because the active code page matters. It governs what is displayed and, in the case of code page 65001, even how commands work (or don't work).
Here's as faithful as possible on PerlMonks a representation of exactly what I see on my screen as I type these commands at the Windows Command Prompt:
Successfully opened file 'acent≤.dat'D:\>chcp 1252 Active code page: 1252 D:\>dir acentó.dat /b acentó.dat D:\>perl test.pl acentó.dat Successfully opened file 'acentó.dat' D:\>chcp 437 Active code page: 437 D:\>perl test.pl acentó.dat
D:\>chcp 850 Active code page: 850 D:\>perl test.pl acentó.dat Successfully opened file 'acentľ.dat' D:\>chcp 65001 Active code page: 65001 D:\>perl test.pl acentó.dat Successfully opened file 'acent.dat' D:\>type test.pl #!perl use strict; use warnings; my $fn = shift @ARGV; if (open my $fh, '<', $fn) { print "Successfully opened file '$fn'\n"; close $fh; } else { print "Error opening file '$fn': $!\n"; } D:\>
(Sorry, I can't follow your session log because there are too many things going on in it at once. It's too dense and complicated.)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: opening accented file names
by BrowserUk (Patriarch) on Nov 12, 2010 at 02:06 UTC | |
by Jim (Curate) on Nov 12, 2010 at 05:39 UTC | |
by BrowserUk (Patriarch) on Nov 12, 2010 at 06:02 UTC | |
by Jim (Curate) on Nov 12, 2010 at 17:39 UTC | |
by choroba (Cardinal) on Nov 12, 2010 at 17:49 UTC | |
|