in reply to UTF-8 and readdir, etc.
Hello irw005. This is the subrutine I use to read the file names in a directory with unicode names (use Win32::Unicode::Dir)
sub ReadDir{ my $Directory=shift; my @Documents; print "Reading directory's content $Directory\n"; my $wdir = Win32::Unicode::Dir->new; $wdir->open($Directory) || die; for ($wdir->fetch) { next if /^\.{1,2}$/; push (@Documents, $_) } $wdir->close || dieW $wdir->error; return \@Documents; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: UTF-8 and readdir, etc.
by Anonymous Monk on Jan 31, 2018 at 18:39 UTC | |
by Anonymous Monk on Jan 31, 2018 at 18:45 UTC |