unicode error

Bug #578004 reported by dkmatt0
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
web.py
New
Undecided
Unassigned

Bug Description

sorry for my bad english...

i have a UnicodeDecodeError if url contains char like é or ï or another non-utf8 bytes

this is the traceback for the url "http://0.0.0.0:8080/browse/testéîö" :
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/web/wsgiserver/__init__.py", line 1174, in communicate
    req.respond()
  File "/usr/lib/python2.6/site-packages/web/wsgiserver/__init__.py", line 544, in respond
    self._respond()
  File "/usr/lib/python2.6/site-packages/web/wsgiserver/__init__.py", line 558, in _respond
    for chunk in response:
  File "/usr/lib/python2.6/site-packages/web/utils.py", line 353, in safestr
    return str(obj)
  File "/usr/lib/python2.6/site-packages/web/template.py", line 1254, in __str__
    return self["__body__"].encode('utf-8')
  File "/usr/lib/python2.6/site-packages/web/template.py", line 1247, in __getitem__
    self["__body__"] = u"".join(self._data)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37: ordinal not in range(128)

you can test source code, there is on http://codingteam.net/project/control-me/browse
you need mpd, python-mpd and mako templates to test this web app.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.