Use proper encoding name

When system is unicode, the second item in locale.getdefaultlocale() is
"UTF8", not "utf-8".
This commit is contained in:
Mika Bostrom 2010-01-26 08:01:46 +02:00
parent 12367d6f37
commit 7f04ed88f4

View File

@ -29,7 +29,7 @@ encoder_to_sys = codecs.lookup(Configuration.LOCALE_ENCODING)
# I'm saving a few cycles with this one
not_needed = False
if Configuration.LOCALE_ENCODING == 'utf-8':
if Configuration.LOCALE_ENCODING == 'UTF8':
not_needed = True
def to_utf8(s):