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

Guido 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-3000 mailing list

AltStyle によって変換されたページ (->オリジナル) /