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 gordonmessmer
Recipients Jeffrey.Kintscher, benjamin.peterson, gordonmessmer, hroncok, lemburg, mattheww, ncoghlan, serhiy.storchaka, vstinner
Date 2019-07-24.04:24:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As an example, let's consider dnf's i18n setup:

        dnf.pycomp.setlocale(locale.LC_ALL, '')
    except locale.Error:
        # default to C.UTF-8 or C locale if we got a failure.
            dnf.pycomp.setlocale(locale.LC_ALL, 'C.UTF-8')
            os.environ['LC_ALL'] = 'C.UTF-8'
        except locale.Error:
            dnf.pycomp.setlocale(locale.LC_ALL, 'C')
            os.environ['LC_ALL'] = 'C'

If setting the environment-specified locale fails, dnf will attempt to set the locale
to C.UTF-8, and if that fails it will set the locale to C.  This seems like an ideal
process.  If the expected locale is missing, dnf will attempt to at least use UTF-8,
before falling back to the C locale.

Unfortunately, because of the alias, this process will be unable to set the 'C.UTF-8'
locale on systems which do not have the 'en_US' locale installed.  This renders
system support for 'C.UTF-8' unusable when no locales are installed.
Date User Action Args
2019-07-24 04:24:56gordonmessmersetrecipients: + gordonmessmer, lemburg, ncoghlan, vstinner, mattheww, benjamin.peterson, serhiy.storchaka, hroncok, Jeffrey.Kintscher
2019-07-24 04:24:56gordonmessmersetmessageid: <>
2019-07-24 04:24:56gordonmessmerlinkissue30755 messages
2019-07-24 04:24:55gordonmessmercreate