Bryan Lawrence wrote:
> Hi Ian
> 
> Thanks for this, but I'm obviously being a bit obtuse:
> 
>> Your app should never return any unicode.  You can wrap pieces in 
>> paste.lint or wsgiref.validate, which will possibly catch this error 
>> earlier.
> 
> But I'm returning something which is intended to become a web page ...
> 
>>> Do I need to formally encode my base string somehow? I was under the
>>> impression that unicode objects should work fine ...
>> No, no unicode objects are allowed in WSGI.
> 
> which means that it might not be an ascii web page ... how do i do that
> then?

You just have to return encoded unicode, i.e., body.encode('utf8').  And 
add that in the Content-Type, i.e., [('Content-type', 'text/html; 
charset=utf8')]

-- 
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to