On 5 March 2010 19:59, Anders Blomdell <[email protected]> wrote: > Would it make sense to switch mod_python to always use unicode,
No. > as it is now, > publisher supports unicode content, but req.write and FieldList does use > bytestrings. How is mod_python supposed to automagically know what is the correct charset to use on request content and response content. It can't, only your web application will know for certain. Even now with publisher, you should not be relying on the fact that unicode response content is converted to bytes automatically. If you do, then your code will not be portable because if run on a system where the default encoding is something different, it will break. This is because when you return unicode, it is applying the default encoding. Graham
