This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients ixokai, lemburg, ronaldoussoren
Date 2010-10-21.14:15:05
SpamBayes Score 3.95607e-07
Marked as misclassified No
Message-id <>
In-reply-to <>
Stephen Hansen wrote:
> Stephen Hansen <> added the comment:
> Mark, the locals() right before "if encoding:" (line 399) are:
>>>> locale.normalize("en_US.UTF-8")
> {'code': 'en_US.ISO8859-1', 'langname': 'en_US', 'encoding': 'UTF8', 'norm_encoding': 'utf_8', 'defenc': 'ISO8859-1', 'localename': 'en_US.UTF-8', 'lookup_name': 'en_us.utf-8', 'fullname': 'en_us.utf-8'}
> 'en_US.UTF8'


Line 646 in the alias table is wrong:

    'utf_8':                        'UTF8',

should read:

    'utf_8':                        'UTF-8',

I wonder why this wasn't reported earlier - did the GlibC change
the UTF-8 spelling at some point ? I do vaguely remember that I
had to remove the hyphen due to problems with setlocale() not
accepting 'UTF-8', but that was at the time I wrote that part
of, i.e. many years ago.

It doesn't appear to be necessary anymore. I checked on openSUSE
10.3 and 11.3. Both work fine with 'UTF-8' and 'UTF8'.
Date User Action Args
2010-10-21 14:15:07lemburgsetrecipients: + lemburg, ixokai, ronaldoussoren
2010-10-21 14:15:06lemburglinkissue10154 messages
2010-10-21 14:15:05lemburgcreate