#2912 closed defect (fixed)
trunk unicode merge breaks admin script
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | admin/console | Version: | devel |
Severity: | normal | Keywords: | unicode |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Hi,
The unicode merge broke Trac with python2.3, due to a bug in python2.3's locale module. This shows up as:
ilinger@lith:~/trac-db-testing$ sudo trac-admin /usr/local/foo Welcome to trac-admin 0.10dev Interactive Trac administration console. Copyright © 2003-2006 Edgewall Software
Type: '?' or 'help' for help on commands.
Trac usr/local/foo> component list
Command failed: unknown encoding: en_gb
locale.getdefaultlocale() reads the LANGUAGE variable incorrect, and returns a value that the encode() method does not understand. This also causes the unit tests to fail. Instead of working around the bug, a better solution is to call locale.getpreferredencoding() (all we care about is the encoding anyways), since it is not broken in python2.3.
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | encoding-fix.patch added |
---|
comment:1 by , 19 years ago
Component: | general → trac-admin |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Patch commited in [3027]. Thanks!
comment:3 by , 19 years ago
Keywords: | unicode added |
---|
Andres, would you mind checking if with my changes (i.e. r3114) this still works for you?
string encoding fix for python2.3+trac; against r3025