Bugzilla – Bug 1162882
icu: Qt apps cannot handle non-ASCII filesystem path if LC_ALL is defined and empty
Last modified: 2023-10-30 20:30:04 UTC
libicu-uc's ucnv_getDefaultName() returns "US-ASCII" if LC_ALL is set explicitly to an empty string in the environment (compared to not being set at all). As effect e.g. all Qt-based code run where LC_ALL="" is part of the environment variables is not able to handle non-ASCII path in the filesystem. Example: run LC_ALL= kate or okteta, kwrite, etc. and try to load or save a file with non-ascii chars, like German umlauts äöü (ex: "ärger.txt"). Because Qt's QTextCodec::codecForLocale() used for decoding/encoding names from the filesystem is an instance of QIcuCodec (on openSUSE & friends) which queries the system default from libicu-uc by that very ucnv_getDefaultName(). That behaviour of libicu-uc is rather unexpected. And seems also not present on all Linux flavours, e.g. with some versions of Debian & Ubuntu LC_ALL="" was treated the same as not being set. All code I have seen elsewhere handling LC_ALL does not make a difference between being not set or being an empty string, but maps both to: not set. POSIX.1-2017 take on this seems this: "If the LC_ALL environment variable is defined and is not null, the value of LC_ALL shall be used." from https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html Some old commit to libicu once fixed things for Solaris only: https://github.com/unicode-org/icu/commit/a8b1972f9263f481d0c50db709f93da3813de706 Not idea if that code patched there is the code responsible for what we see here, but the pattern (check for a != 0 && *a != \0) would be the same. To reproduce the issue, find a small sample program and build instructions in this comment: https://bugs.documentfoundation.org/show_bug.cgi?id=130080#c18 (that bug is about the wrapper script for starting libreoffice actually resulting in LC_ALL being set to an empty string, thus failing with the Qt/KF platform plugin to handle non-ascii filesystem names). Had no time to look into libicu myself, thus also no proposals what and how to fix/patch here exactly.
This looks like a problem in libicu more than Qt applications to me. Reassigning.
Of course people will get it wrong - POSIX never mentions what "null" is supposed to mean in that context.
This is an autogenerated message for OBS integration: This bug (1162882) was mentioned in https://build.opensuse.org/request/show/779018 Factory / icu
rq accepted
openSUSE-SU-2021:4063-1: An update that contains security fixes and contains one feature can now be installed. Category: security (important) Bug References: 1158955,1159131,1161007,1162882,1167603,1182252,1182645 CVE References: JIRA References: SLE-17893 Sources used: openSUSE Leap 15.3 (src): icu.691-69.1-7.3.2
SUSE-SU-2021:4063-1: An update that contains security fixes and contains one feature can now be installed. Category: security (important) Bug References: 1158955,1159131,1161007,1162882,1167603,1182252,1182645 CVE References: JIRA References: SLE-17893 Sources used: SUSE Linux Enterprise Module for Basesystem 15-SP3 (src): icu.691-69.1-7.3.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:3563-1: An update that solves two vulnerabilities, contains two features and has 16 security fixes can now be installed. Category: security (moderate) Bug References: 1030253, 1095425, 1103893, 1112183, 1146907, 1158955, 1159131, 1161007, 1162882, 1166844, 1167603, 1182252, 1182645, 1192935, 1193951, 354372, 437293, 824262 CVE References: CVE-2020-10531, CVE-2020-21913 Jira References: PED-4917, SLE-11118 Sources used: SUSE Manager Retail Branch Server 4.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Manager Server 4.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.1 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.2 (src): icu73_2-73.2-150000.1.3.1 openSUSE Leap 15.4 (src): icu73_2-73.2-150000.1.3.1 openSUSE Leap 15.5 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.4 (src): icu73_2-73.2-150000.1.3.1 Basesystem Module 15-SP4 (src): icu73_2-73.2-150000.1.3.1 Basesystem Module 15-SP5 (src): icu73_2-73.2-150000.1.3.1 SUSE Manager Proxy 4.2 (src): icu73_2-73.2-150000.1.3.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:3563-2: An update that solves two vulnerabilities, contains two features and has 16 security fixes can now be installed. Category: security (moderate) Bug References: 1030253, 1095425, 1103893, 1112183, 1146907, 1158955, 1159131, 1161007, 1162882, 1166844, 1167603, 1182252, 1182645, 1192935, 1193951, 354372, 437293, 824262 CVE References: CVE-2020-10531, CVE-2020-21913 Jira References: PED-4917, SLE-11118 Sources used: SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): icu73_2-73.2-150000.1.3.1 SUSE Enterprise Storage 7.1 (src): icu73_2-73.2-150000.1.3.1 SUSE Enterprise Storage 7 (src): icu73_2-73.2-150000.1.3.1 SUSE CaaS Platform 4.0 (src): icu73_2-73.2-150000.1.3.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2023:3563-3: An update that solves two vulnerabilities, contains two features and has 16 security fixes can now be installed. Category: security (moderate) Bug References: 1030253, 1095425, 1103893, 1112183, 1146907, 1158955, 1159131, 1161007, 1162882, 1166844, 1167603, 1182252, 1182645, 1192935, 1193951, 354372, 437293, 824262 CVE References: CVE-2020-10531, CVE-2020-21913 Jira References: PED-4917, SLE-11118 Sources used: SUSE Manager Retail Branch Server 4.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Manager Server 4.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.1 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.2 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.2 (src): icu73_2-73.2-150000.1.3.1 openSUSE Leap Micro 5.2 (src): icu73_2-73.2-150000.1.3.1 openSUSE Leap Micro 5.3 (src): icu73_2-73.2-150000.1.3.1 openSUSE Leap Micro 5.4 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.3 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): icu73_2-73.2-150000.1.3.1 SUSE Linux Enterprise Micro 5.4 (src): icu73_2-73.2-150000.1.3.1 Basesystem Module 15-SP4 (src): icu73_2-73.2-150000.1.3.1 Basesystem Module 15-SP5 (src): icu73_2-73.2-150000.1.3.1 SUSE Manager Proxy 4.2 (src): icu73_2-73.2-150000.1.3.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.