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 committed by Gerko de Roo
parent 88cf6ec3a5
commit ff9305924c

View File

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