How to fix a locale setting warning from Perl

Your OS doesn’t know about en_US.UTF-8. You didn’t mention a specific platform, but I can reproduce your problem: % uname -a OSF1 hunter2 V5.1 2650 alpha % perl -e exit perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LANG = “en_US.UTF-8” are supported and installed on your … Read more

en_US or en-US, which one should you use?

I’m pretty sure “-” is the standard. If you see “_” somewhere it’s probably something some people came up with to make it a valid identifier. Personally I’d go with “-“, just to be correct. http://en.wikipedia.org/wiki/IETF_language_tag

List of All Locales and Their Short Codes?

The importance of locales is that your environment/os can provide formatting functionality for all installed locales even if you don’t know about them when you write your application. My Windows 7 system has 211 locales installed (listed below), so you wouldn’t likely write any custom code or translation specific to this many locales. Edit: The … Read more