Am 20.03.2006 um 23:49 schrieb Andres Salomon:
Andres Salomon wrote:
Andres Salomon wrote:
[...]
Trac [/usr/local/foo]> component list
Command failed: unknown encoding: en_gb
Are others seeing this, or is my bastardized sarge+bpo setup somehow
broken? This is straight trunk, w/ no mysql patches or anything.
Ah-ha, I think this is a python2.3 bug. From gvr's source[0]:
# FIX locale.py LANGUAGE parsing bug, the fix was added on the
# upstream CVS on the 1.28.4.2 revision of 'locale.py', It
# should be included on Python 2.4.2.
I tried the same thing (getdefaultlocale()) on a python2.4/ubuntu
machine, and it worked. Of course:
17:26 < sto> dilinger: if you want the encoding shouldn't it be get
using
locale.getpreferredencoding()?
17:27 < sto> dilinger: The locale name has nothing to do with the
encoding, no?
locale.getdefaultlocale()
['en_US', 'en_gb']
locale.getpreferredencoding()
'ISO-8859-1'
I think he's right, and getpreferredencoding() seems to work on
both as
well. As cons_locale isn't used at all, I dropped it. After applying
the attached patch, all unit tests succeeded.
Thanks for the patch, I've checked it in now.
Cheers,
Chris
--
Christopher Lenz
cmlenz at gmx.de
http://www.cmlenz.net/
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev