A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046133.html below:

[Python-Dev] test__locale weirdness

[Python-Dev] test__locale weirdnessBrett C. bac at OCF.Berkeley.EDU
Wed Jul 14 03:25:19 CEST 2004
Nick Bastin wrote:
[SNIP - showing how locale.localeconv() is broken on OS X]
> int
> main (int argc, char *argv[])
> {
> struct lconv *result;
> 
> if (!setlocale(LC_NUMERIC, "fr_FR")) {
>   printf("setlocale() failed\n");
>   exit(1);
> }
> if (!( result = localeconv() )) {
>   printf("localeconv() failed\n");
>   exit(1);
> }
> 
> printf("Claimed locale:%s\n", setlocale(LC_NUMERIC, NULL));
> printf("decimal point: '%s', thousands_sep: '%s'\n", result->decimal_point,
> result->thousands_sep);
> 
> return 0;
> }
> 
> displays:
> 
> Claimed locale:fr_FR
> decimal point: ',', thousands_sep: ''
> 
> Which is exactly what you'd expect from a working implementation.  Does 
> anybody know what Python is doing beyond what this simple test does?
> 

In case anyone else is following/working on this, I stuck the C code 
shown above into the beginning of the module initialization function and 
it is wrong at that point already.

-Brett
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4