Strange results from executing a locale command

Pete pete at mollysrevenge.com
Wed Oct 12 18:58:23 EDT 2011


I was given the following code by RR support to execute a locale command in
OS X:

 *put* line 1 of shell("defaults read .GlobalPreferences AppleLocale") into$LANG
*put* uniDecode(uniEncode(shell("locale -k LC_NUMERIC"), "utf8")) intomyFormats

After execution, myFormats contains:

decimal_point="."
thousands_sep=
grouping="0"

If I execute the same locale command in Terminal, the output looks like:

decimal_point="."
thousands_sep=","
grouping="3;3"

The first line in MyFormats is the same as the first line in the Terminal
output but the other lines have garbage after the "=".  What am I doing
wrong?


Thanks,


Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list