Ok this code works great:
self.response.out.write(u'السلام عليكم'.encode('utf-8'))
but when i use an html page instead of a string just like this:
self.response.out.write(template.render(u'test.html'.encode('utf-8')))
it displays arabic characters rabish
in the html page i tried to write this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
and tried with out it arabic characters rabish
both displays
2010/12/16 风笑雪 <kea...@gmail.com>

> I suggest you always use UTF-8, not windows-1256.
>
> However, if you insist on using windows-1256, you should encode your
> unicode output to str:
> self.response.out.write(u'some unicode string'.*encode*('windows-1256'))
> or:
> self.response.out.write('some windows-1256 string') # don't decode it
>
> ----------
> keakon
>
> My blog(Chinese): www.keakon.net
> Blog source code: https://bitbucket.org/keakon/doodle/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to