[I18n-sig] ugettext charset

My Th rei4dan at gmail.com
Sat Jun 26 20:02:25 CEST 2010


I'm using Python 2.6.5 and gettext. Currently ugettext() and ungettext()
doesn't respect 'codeset' setting and return only ASCII encoded strings.
Is it by design or is it a bug? It seems that in issue tracker there is
no issue about this. And as it is now it contradicts documentation,
which says: "If provided, codeset will change the charset used to encode
translated strings".

This breaks some things, because, ASCII encoded unicode strings are not
considered equivalent to unicode strings in different encodings even if
they contain exactly the same characters. And unicode() function by
default returns ASCII encoded strings. In this case it should get an
argument for encoding.


More information about the I18n-sig mailing list