Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4730 closed defect (fixed)

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

Reported by: academic@… Owned by: Matthew Good
Priority: normal Milestone: 0.10.4
Component: report system Version: 0.10.3
Severity: normal Keywords: unicode
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I installed Trac 0.10.3 on linux running with mod_python, sqlite and python 2.3.4.

When I logged in as ascii user name such as 'academic', everythig works well.

But when I logged in as utf-8 user name such as '홍길동', the click on report link (report:1, report:2, ...) throws the following traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 88, in process_request
    resp = self._render_view(req, db, id)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 243, in _render_view
    self.add_alternate_links(req, args)
  File "/usr/lib/python2.3/site-packages/trac/ticket/report.py", line 378, in add_alternate_links
    href = '&' + urllib.urlencode(params)
  File "/usr/lib/python2.3/urllib.py", line 1206, in urlencode
    v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 18 years ago

Keywords: unicode added; utf-8 removed
Milestone: 0.10.4

comment:2 by Matthew Good, 18 years ago

Resolution: fixed
Status: newclosed

This is fixed by r4869.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.