[Python-Dev] [Python-checkins] cpython (3.2): Skip test_getsetlocale_issue1813() on Fedora due to setlocale() bug. (original) (raw)

R. David Murray rdmurray at bitdance.com
Tue Aug 2 13:31:46 CEST 2011


On Tue, 02 Aug 2011 12:12:37 +0200, Stefan Krah <stefan at bytereef.org> wrote:

Stefan Krah <stefan at bytereef.org> wrote: > Fedora's glibc has an additional issue with the Turkish 'I' that can > be reproduced by the simple C program in: > > https://bugzilla.redhat.com/showbug.cgi?id=726536

OK, this runs successfully on Ubuntu Lucid and FreeBSD (if you change the first trTR to trTR.UTF-8). But it fails on Debian lenny, as does testgetsetlocaleissue1813(). I suspect many buildbots are green because they don't have trTR and trTR.iso8859-9 installed.

This is true for my Gentoo buildbots. Once we've figured out the best way to handle this, I'll fix that (install the other locales) for my two.

Synopsis for the people who don't want to wade through the bug reports:

If this is a valid C program ... #include <stdio.h> #include <locale.h> int main(void) { char *s; printf("%s\n", setlocale(LCCTYPE, "trTR")); printf("%s\n", setlocale(LCCTYPE, NULL)); s = setlocale(LCCTYPE, "trTR.ISO8859-9"); printf("%s\n", s ? s : "null"); return 0; } ..., several systems (Fedora 14, Debian lenny) have a glibc bug that is exposed by testgetsetlocaleissue1813(). People usually don't see this because trTR and trTR.iso8859-9 aren't installed.

I get null as the final output of that regardless of whether I use 'tr_TR' or 'tr_TR.utf8'.

This is with glibc-2.13-r2 (the r2 is Gentoo's mod number).

I'll attach this to the bug report, too, perhaps the discussion should move there.

-- R. David Murray http://www.bitdance.com



More information about the Python-Dev mailing list