Edgewall Software

Ticket #4730 (closed defect: fixed)

Opened 2 years ago

Last modified 2 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:

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

Changed 2 years ago by cboos

  • keywords unicode added; utf-8 removed
  • milestone set to 0.10.4

Changed 2 years ago by mgood

  • status changed from new to closed
  • resolution set to fixed

This is fixed by r4869.

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

Author


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


Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from mgood. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.