Bug 1162882 - icu: Qt apps cannot handle non-ASCII filesystem path if LC_ALL is defined and empty
Summary: icu: Qt apps cannot handle non-ASCII filesystem path if LC_ALL is defined and...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jan Engelhardt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-05 18:47 UTC by Friedrich W. H. Kossebau
Modified: 2023-10-30 20:30 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2020-02-05 18:47:44 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.
Comment 1 Luca Beltrame 2020-02-05 20:22:32 UTC
This looks like a problem in libicu more than Qt applications to me. Reassigning.
Comment 2 Jan Engelhardt 2020-02-06 18:46:06 UTC
Of course people will get it wrong - POSIX never mentions what "null" is supposed to mean in that context.
Comment 3 Swamp Workflow Management 2020-02-25 11:20:06 UTC
This is an autogenerated message for OBS integration:
This bug (1162882) was mentioned in
https://build.opensuse.org/request/show/779018 Factory / icu
Comment 4 Jan Engelhardt 2020-02-29 21:40:36 UTC
rq accepted
Comment 11 Swamp Workflow Management 2021-12-14 17:19:27 UTC
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
Comment 12 Swamp Workflow Management 2021-12-14 17:37:22 UTC
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.
Comment 18 Maintenance Automation 2023-09-08 16:30:02 UTC
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.
Comment 19 Maintenance Automation 2023-10-23 20:30:04 UTC
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.
Comment 20 Maintenance Automation 2023-10-30 20:30:04 UTC
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.