I tried to use the templating system of web2py for parsing dynamically 
generated views. Theoretically, it should work - render from gluon.template 
accepts streams and strings as well. However, it seems that due to the fact 
it uses cStringIO instead of StringIO, it is unable to process unicode 
characters:

http://stackoverflow.com/questions/4677512/can-i-use-cstringio-the-same-as-stringio

So if my dynamically generated view contains any unicode characters, the 
rendering breaks with the error:

<type 'exceptions.UnicodeEncodeError'> 'ascii' codec can't encode character 

It seems that it would be sufficient to change cStringIO to StringIO in 
gluon.template

Or am I missing something?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to