Opened 20 years ago
Closed 20 years ago
#2903 closed defect (fixed)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe8' in position 15
| Reported by: | Alec Thomas | Owned by: | Christopher Lenz |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | general | Version: | devel |
| Severity: | minor | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
I'm getting this traceback in my Apache logs every now and then:
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 86, in handler
gateway.run(dispatch_request)
File "/usr/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in run
response = application(self.environ, self._start_response)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 320, in dispatch_request
req.send_error(sys.exc_info(), status=500)
File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 352, in send_error
exc_info)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 283, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 170, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/tractags/web_ui.py", line 59, in process_request
File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 116, in process_request
req.write(page.text)
File "/usr/lib/python2.4/site-packages/trac/web/api.py", line 405, in write
self._write(data)
File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 78, in _write
self.req.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe8' in position 15: ordinal not in range(128)
Attachments (0)
Change History (6)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Yep, pretty sure it was after the unicode merge. I did another update this afternoon, will update the ticket if I see it again.
comment:3 by , 20 years ago
| Description: | modified (diff) |
|---|
I'd have a look myself, but I know exactly zip about character encoding and don't have the time to learn it at the moment :(
comment:5 by , 20 years ago
| Component: | mod_python frontend → wiki |
|---|---|
| Milestone: | → 0.10 |
| Status: | new → assigned |
This is about requests for the plain text view of wiki pages. Trac tries to write unicode data to the response, which then gets encoded to ASCII (instead of UTF-8).
Probably similar problems elsewhere where we use req.write().
comment:6 by , 20 years ago
| Component: | wiki → general |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Fixed in [3029].



0.10dev after the unicode branch has been merged? (i.e. ≥ r3024)
If not, can you try to upgrade?