Edgewall Software

Ticket #2912 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

trunk unicode merge breaks admin script

Reported by: Andres Salomon <dilinger@…> Owned by: cmlenz
Priority: normal Milestone: 0.10
Component: admin/console Version: devel
Severity: normal Keywords: unicode
Cc:

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 (c) 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

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

Change History

Changed 3 years ago by Andres Salomon <dilinger@…>

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

Changed 3 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • status changed from new to assigned
  • component changed from general to trac-admin

Changed 3 years ago by cmlenz

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

Patch commited in [3027]. Thanks!

Changed 3 years ago by cboos

  • keywords unicode added

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

Add/Change #2912 (trunk unicode merge breaks admin script)

Author



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