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/2007-July/073830.html below:

[Python-Dev] Need help fixing failing Py3k Unittests in py3k-struni

[Python-Dev] Need help fixing failing Py3k Unittests in py3k-struni [Python-Dev] Need help fixing failing Py3k Unittests in py3k-struniGuido van Rossum guido at python.org
Wed Jul 11 23:05:39 CEST 2007
On 7/11/07, Chris McDonough <chrism at plope.com> wrote:
> I have a very remedial question about how to fix test failures due to
> the side effects of string-unicode integration.
>
> The xmlrpc library uses explicit encoding to encode XML tag payloads
> to (almost always) utf8.  Tag literals are not encoded.
>
> What would be the best way to mimic this behavior under the new
> regime?  Just use unicode everywhere and encode the entire XML body
> to utf-8 at the end?  Or deal explicitly in bytes everywhere?  Or..?

The correct approach would be to use Unicode (i.e., str) everywhere
and encode to UTF-8 at the end. If that's too hard something's wrong
with the philosophy of using Unicode everywhere...

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

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