[Python-Dev] What is test__locale supposed to test, anyhow?
Nick Bastin
nbastin at opnet.com
Thu Jul 15 16:42:46 CEST 2004
On Jul 15, 2004, at 7:07 AM, Jack Jansen wrote:
>
> On 15 Jul 2004, at 07:02, Nick Bastin wrote:
>>> But not on OS X. It raises TestSkipped saying how locale support is
>>> so minimal that it isn't worth testing.
>>
>> Yeah, I'm going remove that and test it out...that message may be
>> bogus at this point - it was put there a year and a half ago by Jack,
>> and I'm reasonably sure that no one's tested it since (and I don't
>> believe it anyhow - it's more like Python's support is bad - MacOS
>> X's support for locale is pretty good).
>
> MacOSX's support for locale was abysmal up to 10.2, a trait which it
> inherited from FreeBSD. It is much better under 10.3 (but still
> completely separate from the MacOSX native way to specify currency
> signs and what have you).
>
> But it seems the C library doesn't use the locale info, here's the
> output from test_locale (from cvs head, on 10.3.4):
No, this is something broken in Python - I just haven't figured out
what. If you were to write a small test program in C, you would see
that the locale information you get from the C library is correct.
However, something in Python is screwing this up, because calling
setlocale() in python has almost *no* effect whatsoever on the data
returned by localeconv(). (See previous messages in the thread for
RADIXCHAR issues, specifically)
--
Nick
More information about the Python-Dev
mailing list