Barry Warsaw <barry@python.org> writes: > So I propose to remove the coerce flag, but still Unicode-ify both > msgids and msgstrs. Then .ugettext() will just return the Unicode > msgstr in the catalog, while .gettext() will encode it to an 8-bit > string based on the charset. Personally, I think most i18n Python apps > are going to want to use .ugettext() anyway, so for the average program > this will just work as expected. > > I have the tests passing for this change. Any objections? For safety, I'd recommend that you use byte string msgids if conversion to Unicode fails. Otherwise, I'm fine with automatically coercing everything to Unicode. I do know about catalogs that use Latin-1 in msgids (to represent accented characters in the names of authors). That should not cause failures. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4