[mod_python] Unicode support?

Jon-Pierre Gentil jgentil at sebistar.net
Thu Jun 24 11:58:37 EDT 2004


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

Nick wrote:
> Jon-Pierre Gentil wrote:
>
>>> Try:
>>> result = result.encode("utf-8")
>>
>>
>>
>> My point is that the code is in publisher.py, inside mod_python.  I'm
>> not going to change the code of mod_python, at least without making a
>> patch for it... and consulting the developers.  I understand the process
>> of converting unicode strings, I just wish that mod_python wouldn't do
>> it at all.
>
>
> It may be apache that's doing the encoding.  Check your apache config
> and turn off UTF-8, unless you really need unicode support then that
> won't help ;-)

It's not, though.  It's done in mod_python, in the Publisher, line 143
of publisher.py.  :)  If I use my own handler it works great, I can
output UTF-8 or UTF-16 or any other character set.  For some reason the
publisher tries to convert it to ascii.

- --
::  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

iEYEARECAAYFAkDa+i0ACgkQOrVFmaIbww7CTQCglDP/lxhKYhiMDwXBr0p7QZHm
Wt4An3BGn7k2W4w5puKNk4XdDl6ZFkih
=Kq0k
-----END PGP SIGNATURE-----


More information about the Mod_python mailing list