Edgewall Software
Modify

Ticket #4730 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: academic@… Owned by: mgood
Priority: normal Milestone: 0.10.4
Component: report system Version: 0.10.3
Severity: normal Keywords: unicode
Cc:
Release Notes:
API 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

Change History

comment:1 Changed 5 years ago by cboos

  • Keywords unicode added; utf-8 removed
  • Milestone set to 0.10.4

comment:2 Changed 5 years ago by mgood

  • Resolution set to fixed
  • Status changed from new to closed

This is fixed by r4869.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from mgood. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.