respond() returns unicode?

View: New views
2 Messages — Rating Filter:   Alert me  

respond() returns unicode?

by Milos Negovanovic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

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?

Regards
--
Milos Negovanovic
milos.negovanovic@...

------------------------------------------------------------------------------
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
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

Re: respond() returns unicode?

by Bugzilla from jbq@caraldi.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/7/30 Milos Negovanovic <milos.negovanovic@...>:
>
> 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
_______________________________________________
Cheetahtemplate-discuss mailing list
Cheetahtemplate-discuss@...
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss