![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: encoding of file namesby ikegami (Patriarch) |
on Mar 25, 2010 at 21:34 UTC ( #830974=note: print w/replies, xml ) | Need Help?? |
Usually, the file names are text encoded as per the local's encoding. In fact, I dare say that's the expectation. Most users have a UTF-8 locale. You could assume UTF-8, and worry about it when someone complains. If you want to actually get the right encoding, your best bet is probably the following undocumented function:
This is what core module open uses.
It's a real mess. Bad support by builtins and by modules for accessing Windows's wide character interface. Bad support at finding the code page (last time I checked) of the single-byte interface (even though it's easier than locales in unix). Maybe some other time.
In Section
Seekers of Perl Wisdom
|
|