Author vstinner
Recipients
Date 2006-09-06.14:00:57
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
locale.getdefaultlocale() is not able to get my 
terminal charset when _locale is missing.

My variable environement (I'm using Kubuntu Dapper):
$ env|egrep '(LANG|LC_)'
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR:fr:en_GB:en

The problem is that locale.getdefaultlocale() try to 
use $LANGUAGE before $LANG, and $LANGUAGE don't 
contain charset information.

So I choosed to test LANGUAGE as last change, and 
backport Python 2.5c1 patch (just use first language 
from $LANGUAGE: localename = localename.split(':')
[0]).

The bug should be in Python 2.x (at least 2.4.x and 
2.5.x).

Haypo
History
Date User Action Args
2007-08-23 15:54:35adminlinkissue1553427 messages
2007-08-23 15:54:35admincreate