[XML-SIG] xmlproc bug ?

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 6 Sep 2001 16:51:15 +0200


> Note that your ORIGINAL source fails with 2.1/0.7, too. Is there a way to 
> register a default encoding with str()? I just tried setlocale(), and that 
> did not change anything.

No. You can set it in site.py, but that is discouraged, since it means
that the same code will run differently on different machines.

Explicit is better than implicit, you should always use .encode if you
want to output a Unicode object onto a byte stream (such as
sys.stdout).

If you just want to print it for debugging purposes, using repr() is
best.

Regards,
Martin