Paul Schinder wrote:
It certainly seems to be Apple's bug. en_EU/LC_MONETARY shows ",", not
"'", for the monetary decimal point (if I'm reading it right; I compared
it with en_US/LC_MONETARY). Checking some of the neighboring locale's
(es_ES, fr_FR) LC_NUMERIC shows ",".
I concur that this is probably something weird with the Apple implementation. I
have a small script in my Math::Currency distro which extracts the currency
information for different locales and this is what I see with SUSE 9.2's eu_ES:
$LC_MONETARY->{EUR} = {
INT_CURR_SYMBOL => 'EUR ',
CURRENCY_SYMBOL => 'EUR',
MON_DECIMAL_POINT => ',',
MON_THOUSANDS_SEP => '.',
MON_GROUPING => '3',
POSITIVE_SIGN => '',
NEGATIVE_SIGN => '-',
INT_FRAC_DIGITS => '2',
FRAC_DIGITS => '2',
P_CS_PRECEDES => '1',
P_SEP_BY_SPACE => '1',
N_CS_PRECEDES => '1',
N_SEP_BY_SPACE => '1',
P_SIGN_POSN => '1',
N_SIGN_POSN => '1',
};
(even the utf8 variant shows the same values for MON_DECIMAL_POINT and
MON_THOUSANDS_SEP). If you are interested in confirming, download the
Math::Currency distro from CPAN and run the scripts/new_currency under Darwin
(you'll have to delete the existing lib/Math/Currency/EUR.pm) and report back
what it finds.
The question is, should perl be able to handle whatever is in that
locale slot, even if it makes no sense, or at least give a more useful
error message?
Perl is able to use locales for *output*, but isn't completely internationalized
with regard to *input* (i.e. the tokenizer isn't that smart yet). I wouldn't
hold my breath for Perl5, but perhaps Perl6 can get this right.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747