Re: respond() returns unicode?

Jean-Baptiste Quenot <[email protected]> Mon, 3 Aug 2009 14:45:34 +0200
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
2009/7/30 Milos Negovanovic <[email protected]>:
>
> Ive upgraded to 2.2.1 on one of my computers and Ive noticed(twisted
> web server throws an exception) that template's respond method now
> returns unicode type string/object. Is this the default behavior now?
> Do I need to manually encode before sending response or there is a
> setting/switch I can turn on and let cheetah do the encoding?

With a WSGI framework you need to call result.encode('utf8') indeed.
-- 
Jean-Baptiste Quenot
http://jbq.caraldi.com/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july