It's your problem. None of the business to neither web.py nor python.
u'my str' -> type is *unicode*
'my str' -> type is *str.* str of specified encoding depends on you src file
encoding.
Basically, you may use
unic = foo.decode('GB2312') to get a unicode object
unic_str = unic.encoding('utf-8') to get a str with utf-8 encoding
but i suggest you to use always *unicode* internal.
if i remember correctly, web.py encode/decode with utf-8 encoding by
default.
Regards, Samuel
http://www.SamuelChen.net
On Tue, May 10, 2011 at 3:22 PM, Cat <[email protected]> wrote:
> Error raise in templates or python? Post your code if nesscery.
> It is not a problem of webpy or python.
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.