Hide Forgot
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
*** This bug has been marked as a duplicate of bug 1361965 ***