A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-April/034914.html below:

[I18n-sig] Changes to gettext.py for Python 2.3

[Python-Dev] Re: [I18n-sig] Changes to gettext.py for Python 2.3 [Python-Dev] Re: [I18n-sig] Changes to gettext.py for Python 2.3Martin v. Löwis martin@v.loewis.de
23 Apr 2003 00:15:08 +0200
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