[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LC_NUMERIC on macOS
From: |
Gonzalo Garramuno |
Subject: |
Re: LC_NUMERIC on macOS |
Date: |
Mon, 13 Jul 2020 07:38:02 -0300 |
Hi, Bruno.
> El 12 jul. 2020, a las 05:24, Bruno Haible <bruno@clisp.org> escribió:
>
>
> 2) The preferences panel of macOS allows the user to set the properties
> independently of any country. The POSIX concept of locale cannot cope with
> that.
Yes, I am interested in handling countries only.
> A properly internationalized macOS app should use the following
> properties from [1]:
>
> * kCFLocaleDecimalSeparator, kCFLocaleGroupingSeparator
> instead of LC_NUMERIC,
> * kCFLocaleCalendarIdentifier instead of LC_TIME,
> * kCFLocaleCollationIdentifier, kCFLocaleCollatorIdentifier
> instead of LC_COLLATE,
> * kCFLocaleCurrencySymbol, kCFLocaleCurrencyCode instead of LC_MONETARY.
If I run setlocale( LC_ALL, “” ); with LC_CTYPE set and with
SETLOCALE_VERBOSE=1, I get the warnings:
Warning: Failed to set locale category LC_NUMERIC to es_AR.
Warning: Failed to set locale category LC_TIME to es_AR.
Warning: Failed to set locale category LC_COLLATE to es_AR.
Warning: Failed to set locale category LC_MONETARY to es_AR.
It seems all is as it should be, but it cannot set the locale for LC_NUMERIC.
And sure enough, localeconv() still returns decimal_point as ‘.’.
—
Gonzalo Garramuno
ggarra13@gmail.com