[issue1813] Codec lookup failing under turkish locale

Stefan Krah report at bugs.python.org
Wed Jul 27 01:35:00 CEST 2011


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Yes, it's a bug. This works:

#include <stdio.h>
#include <locale.h>
int
main(void)
{
    char *s;
    printf("%s\n", setlocale(LC_CTYPE, "tr_TR.ISO8859-9"));
    printf("%s\n", setlocale(LC_CTYPE, NULL));
    s = setlocale(LC_CTYPE, "tr_TR.ISO8859-9");
    printf("%s\n", s ? s : "null");
    return 0;
}

But when I change the first setlocale call to "tr_TR", the result of
the last call is NULL.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1813>
_______________________________________


More information about the Python-bugs-list mailing list