Hi,
the following code works for ASCII:
import web.form
a = web.form.AttributeList(type='text', name='x', value="y")
a
<attrs: 'type="text" name="x" value="y"'>
But not, when non-ASCII is involved:
a = web.form.AttributeList(type='text', name='x', value=u"°")
a
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/dist-packages/web/form.py", line 191, in __repr__
return '<attrs: %s>' % repr(str(self))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in
position 28: ordinal not in range(128)
Is this supposed to work?
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.