This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arnimar
Recipients arnimar
Date 2008-01-12.15:00:02
SpamBayes Score 0.265349
Marked as misclassified No
Message-id <>
When switching to a turkish locale, the codecs registry fails on a codec
lookup which worked before the locale change.

This happens when the codec name contains an uppercase 'I'. What
happens, is just before doing a cache lookup, the string is normalized,
which includes a call to <ctype.h>'s tolower. tolower is locale
dependant, and the turkish locale handles 'I's different from other
locales. Thus, the lookup fails, since the normalization behaves
differently then it did before.

Replacing the tolower() call with this made the lookup work:

int my_tolower(char c)
	if ('A' <= c && c <= 'Z')
		c += 32;

	return c;

PS: If the turkish locale is not supported, this here will enable it to
an Ubuntu system

a) sudo cp /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/local
   (or just copy the lines with "tr" in them)
b) sudo dpkg-reconfigure locales
Date User Action Args
2008-01-12 15:00:13arnimarsetspambayes_score: 0.265349 -> 0.265349
recipients: + arnimar
2008-01-12 15:00:13arnimarsetspambayes_score: 0.265349 -> 0.265349
messageid: <>
2008-01-12 15:00:02arnimarlinkissue1813 messages
2008-01-12 15:00:02arnimarcreate