[mod_python] Problem with PSP and unicode

Deron Meranda deron.meranda at gmail.com
Thu Feb 16 13:14:27 EST 2006

This is not *just* a PSP problem.  Many frameworks on top of mod_python
also see Unicode brokenness...mostly because of the use of the builtin str()
type conversion and the lack of any control over the default encoding.
For just one example, try putting this into a Myghty template,

    <% u'\u1234' %>

and you get the 'ole 'ascii' UnicodeEncodeError as well.

I still think this is fundamentally a Python problem.  For those
thinking about solutions, there is a current thread in python-dev
that may be somewhat interesting...


Also definitely worth reading is PEP 349
and the corresponding python issue tracking it

For a little more historical perspective, see PEP 332
and also for a little more insight into why things work the
way they do now, read the original unicode proposal at
Deron Meranda

More information about the Mod_python mailing list