Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you concatenate a utf8-tagged string with a non-utf8 tagged string, perl will silently "upgrade" the non-utf8 string to utf8, converting it under the assumption that it is in the local encoding (normally latin1, but might be settable with locale, PERL_ENCODING env or similar).
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. 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). In reply to Re^3: directories and charsets
by jbert
|
|