I have a folder on my USA Windows 7 computer titled "フォルダ". There's a file in it called "foo.txt", and I put a few lines of text in it. I'm trying to read it, which is apparently a very sticky problem. An answer to a related question had a simple-looking method to open the file:
use utf8;
use Encode::Locale;
use Encode;
my $path = 'C:\Users\my name\Desktop\logrus_workspace\フォルダ\foo.txt';
my $new_path = encode(locale_fs => $path);
print $new_path;
open my $fh, '<', $new_path
or die $!;
The call to open
dies with Invalid argument
. Any idea what specific problem that message indicates, and how I can get this unicode-named file open?