On Wednesday, February 5, 2003, at 08:51 AM, Pavel Stranak wrote:
Perl 5.6 works fine with ANY LC_ALL and any LANG in the same shell. How is it possible?

having gone through this problem a while back, and piecing the jigsaw together I surmised that
Apple does some compile time magic to get these two global variables to set.

Setting these as shell environment variables works as long as you run your scripts under a shell - scripts run as cron jobs will start complaining becase they use the system wide environment. How to solve this problem along with a perl script which does it all for you can be found in the archives of this list:
http://www.omnigroup.com/mailman/archive/macosx-admin/2002-September/ 025590.html under the seach friendly subject "Locale setting errors - LC_ALL, LANG"

I would further add that perl complains if you don't set LC_ALL to C because not all locale issues are connected to text processing, a lot of numeric functions depend on locale - so unless you wish to use say roman numerals instead of decimals, you shouldn't have any real need for any other locale definition beyond the standard C library. LANG you can set to whatever you wish I believe*, as this aids perl in its text processing abilities, though I haven't tried setting this to anything other than English.


* provided it is an existising locale definition


HTH

Robin



Reply via email to