Hey guys,
I don't know how form.render() deals with the unicode charactors, I
have a problem here. Here's the code in handler:
f = commentForm()
if f.validates():
...
else:
....
and code in template:
<td>{{ f.username.render() }}</td>
Yes, I use jinja2 for template
The problem is, when I input Chinese charactors in input and did some
wrong charators to test the validates, then I got an error like this:
<type 'exceptions.UnicodeDecodeError'> at /entry/markdown/
('ascii', '<input type="text" name="username"
value="\xe6\x88\x91\xe4\xbb\xac" id="username" /><strong
class="wrong">Username must be 3-15 charactors</strong>', 42, 43,
'ordinal not in range(128)')
I really don't know how to fix it, and it really bothers me a lot.
Thank guys!
--
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.