in reply to Re^2: directories and charsets
in thread directories and charsets
There is a module to warn you when this happens (can't remember what it's called though).
If such an untagged string already contains utf8 byte sequences, this will give you an incorrect double-encoding of the string.
It seems to me that one way to get the right behaviour is to do:
when reading names from a utf8-named-filesystem.my @files = map { Encode::_utf8_on($_); } readdir DIRHANDLE;
I could be wrong on the NTFS thing, it's just that UCS-2 (UTF-16-a-like) is *very* entrenched on Windows, I'd be very surprised if NTFS wasn't using that as it's native format. (Of course, you may well see it as utf8 when you mount the share with smbfs, I'd expect smbfs to do that translation for you, but maybe it's a mount option or something).
|
|---|