in reply to Tk and Non-ASCII File Names
and see if that works.use utf8;
But I had that problem before, and graph showed how to decode those pesky filenames like the following.
or for a single file#this decode utf8 routine is used so filenames with extended # ascii characters (unicode) in filenames, will work properly use Encode; opendir my $dh, $path or warn "Error: $!"; my @files = grep !/^\.\.?$/, readdir $dh; closedir $dh; # @files = map{ "$path/".$_ } sort @files; #$_ = decode( 'utf8', $_ ) for ( @files ); @files = map { decode( 'utf8', "$path/".$_ ) } sort @files;
from his explanation, that will tell Perl to see it as utf8, even if the filesystem didn't store it as such.use Encode; my $file = decode('utf8', $file)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk and Non-ASCII File Names
by eff_i_g (Curate) on Sep 28, 2010 at 15:43 UTC | |
by zentara (Cardinal) on Sep 28, 2010 at 16:47 UTC | |
by graff (Chancellor) on Sep 30, 2010 at 02:34 UTC | |
by eff_i_g (Curate) on Oct 06, 2010 at 17:22 UTC | |
by graff (Chancellor) on Oct 08, 2010 at 06:51 UTC | |
by eff_i_g (Curate) on Oct 08, 2010 at 13:56 UTC |