[Python-Dev] Small issues in gettext support

"Martin v. Löwis" martin at v.loewis.de
Wed Apr 28 14:15:50 EDT 2004


Gustavo Niemeyer wrote:
> You belive that returning a string in some unpredictable
> encoding used by the translator is explicit? 

No. What is explicit here is that we return the bytes in
the .mo file; and conversion of these bytes should be
requested explicitly.

As for compatibility with GNU gettext: Older versions
of GNU gettext did not perform any conversion, either.
I think changing the behaviour of an existing function
was a bad thing to do for GNU gettext, as well, and I
don't think we should repeat that mistake.

It would be good to find out what users of Python
gettext think about a possible change.

Temporarily warning about this change of behaviour
is also unacceptable. Adding another function, e.g.
lgettext (for local charset), along with lngettext,
ldgettext, might be another solution.

Regards,
Martin




More information about the Python-Dev mailing list