[Python-Dev] Small issues in gettext support (original) (raw)

Gustavo Niemeyer niemeyer at conectiva.com
Mon Apr 26 11:16:07 EDT 2004


I'd be worried most about backwards compatibility, since the module has worked this way since its early days. Also, wouldn't this be an

IMO, the current behavior is wrong, so breaking backwards compatibility in that case would be fixing something important.

opportunity for getting lots of UnicodeErrors? E.g. my system encoding is 'ascii' so gettext() would fail for catalogs containing non-ascii characters. I shouldn't have to change my system encoding just to avoid errors, but with your suggestion, wouldn't that make many catalogs basically unusable for me?

There are a few extra points to notice here:

Would adding bindtextdomaincodeset() would provide a way for the application to change the default encoding?

Yes, it changes the default encoding.

If so, I'd be in favor of adding bindtextdomaincodeset() but not changing the default encoding for returned strings. Then update the documentation to describe current behavior and how to change it via that function call.

Thanks for your suggestion!

-- Gustavo Niemeyer http://niemeyer.net



More information about the Python-Dev mailing list