Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionChristian Heimes
2018-06-13 08:14:50 UTC
Description of problem:
RHEL doesn't support the generic locale "C.UTF-8". Only "C" and language specific locales like "en_US.UTF-8" are supported.
The lack of "C.UTF-8" breaks IdM/IPA. IPA sets LC_ALL=C.UTF-8 in httpd.service file in order to force Python to use UTF-8 file system encoding instead of ASCII file system encoding. Without LC_CTYPE=C.UTF-8 or LC_ALL=C.UTF-8, sys.getfilesystemencoding() is ANSI_X3.4-1968 (aka ASCII), so no file names with non-ASCII chars are supported. You can find more details in https://www.python.org/dev/peps/pep-0538/
I'm opening this bug against glibc, because on Fedora the locale is provided by glibc-common:
# rpm -qf /usr/lib/locale/C.utf8/LC_CTYPE
glibc-common-2.27-15.fc28.x86_64
Version-Release number of selected component (if applicable):
glibc-common-2.17-254.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1. env -i LC_ALL=C.UTF-8 python -c "import sys; print sys.getfilesystemencoding()"
Actual results:
ANSI_X3.4-1968
Expected results:
UTF-8
Additional info:
On RHEL 7.5 and 7.6:
$ env -i LC_ALL=C python -c "import sys; print sys.getfilesystemencoding()"
ANSI_X3.4-1968
$ env -i LC_ALL=C.UTF-8 python -c "import sys; print sys.getfilesystemencoding()"
ANSI_X3.4-1968
$ env -i LC_ALL=en_US.UTF-8 python -c "import sys; print sys.getfilesystemencoding()"
UTF-8
$ python -c "import locale; print locale.setlocale(locale.LC_ALL, 'C.UTF-8')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python2.7/locale.py", line 547, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
On Fedora 27 and 28:
$ env -i LC_ALL=C python -c "import sys; print sys.getfilesystemencoding()"
ANSI_X3.4-1968
$ env -i LC_ALL=C.UTF-8 python -c "import sys; print sys.getfilesystemencoding()"
UTF-8
$ env -i LC_ALL=en_US.UTF-8 python -c "import sys; print sys.getfilesystemencoding()"
UTF-8
$ python -c "import locale; print locale.setlocale(locale.LC_ALL, 'C.UTF-8')"
C.UTF-8