[mod_python] Unicode support?

Jon-Pierre Gentil jgentil at sebistar.net
Wed Jun 23 19:34:07 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


How can the output be encoded in UTF-8?  The publisher breaks on this:

=============
Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line
143, in handler
    result = str(result)

UnicodeEncodeError: 'ascii' codec can't encode characters in position
2144-2145: ordinal not in range(128)
==============

Why does it re-encode it?



- --
::  Jon-Pierre Gentil
::  PGP Key ID 0xA21BC30E
::  Jabber: jgentil at jabber.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iEYEARECAAYFAkDaE2EACgkQOrVFmaIbww47AQCgiZSNxeMj+QcqwnuP0BPF2611
jwYAmwb92K9WDhbqrbZLBJXs1MiASYMr
=iNAa
-----END PGP SIGNATURE-----


More information about the Mod_python mailing list