[Patches] [ python-Patches-866982 ] Bad behavior of
email.Charset.Charset when locale is tr_TR
SourceForge.net
noreply at sourceforge.net
Mon Dec 29 05:30:37 EST 2003
Patches item #866982, was opened at 2003-12-29 10:29
Message generated for change (Settings changed) made by doko
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=866982&group_id=5470
>Category: Library (Lib)
>Group: Python 2.3
Status: Open
Resolution: None
>Priority: 7
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bad behavior of email.Charset.Charset when locale is tr_TR
Initial Comment:
Charset class' behaviour is bad when locale is set to
tr_TR. The problems's source is input_charset =
input_charset.lower() at line 393 of
/usr/lib/python2.3/email/Charset.py . This exeample
code can reproduce the error:
import locale
from email.Charset import Charset
locale.setlocale(locale.LC_ALL,("tr_TR","ISO-8859-9"))
foo = Charset(locale.nl_langinfo(locale.CODESET))
repr(foo) #Returns \xfdso-8859-9 which is not a charset
instead of iso-8859-9
The problem exists because the lower() of I in turkish
charset is ý (\xfd), not i. I will try to create and
submit a patch ASAP.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=866982&group_id=5470
More information about the Patches
mailing list