in the absence of "use utf8", the perl should believe that the file is encoded using character set defined in locale.
I don't think this would be a good idea. The encoding of source files is something that's tied to the files themselves, not the environment they're run in.  In other words, when moving Perl code to a different locale, you'd risk breaking things (unnecessarily)...
Other than that, I agree with the tenor of your post and also do think it would be nice to have locales work in combination with Unicode. After all, locales comprise more than just the definition of valid characters.
However, I'm not proficient enough with locales (nor with the Perl sources) to help out with patches — so I'm not complaining... (Heck, I'm not even sure how things are supposed to work in some aspects. Let's say, with a locale setting of LC_CTYPE=de_DE.UTF-8, should all characters defined in Unicode match \w, or just the ones actually being used in the respective language/region? For example, both 'ä' and '䕧' (U+4567) are valid letters according to Unicode, but the latter is not a valid letter in German, so one might argue it shouldn't match \w when the de_DE locale is in effect.)
In reply to Re: Locale and Unicode, enemies in perl?
by Eliya
in thread Locale and Unicode, enemies in perl?
by andal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |