Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2912 closed defect (fixed)

trunk unicode merge breaks admin script

Reported by: Andres Salomon <dilinger@…> 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)

encoding-fix.patch (449 bytes ) - added by Andres Salomon <dilinger@…> 18 years ago.
string encoding fix for python2.3+trac; against r3025

Download all attachments as: .zip

Change History (4)

by Andres Salomon <dilinger@…>, 18 years ago

Attachment: encoding-fix.patch added

string encoding fix for python2.3+trac; against r3025

comment:1 by Christopher Lenz, 18 years ago

Component: generaltrac-admin
Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

comment:2 by Christopher Lenz, 18 years ago

Resolution: fixed
Status: assignedclosed

Patch commited in [3027]. Thanks!

comment:3 by Christian Boos, 18 years ago

Keywords: unicode added

Andres, would you mind checking if with my changes (i.e. r3114) this still works for you?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.