QCoreApplications sets QTextCodec::codecForLocale() incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtbase-opensource-src (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
With ICU versions >= 61 QTextCodec:
On bionic, which included ICU 60, codecForLocale() returned the correct codec. On eoan and focal, which include ICU 63 and ICU 66, the utf-8 codec is always returned.
The change in behavior is expected due to a documented change in ICU https:/
However, Qt has not accounted for this change in ICU.
I note that Qt 5.12.8 from https:/
The included file localetrouble.tar contains
1) demo: a script that builds two tests cases and runs them
2) focal.log: the results of running the demo script on focal
3) bionic.log: the results of running the demo script on bionic
4) test1.cc: a minimal Qt Core application that tries to use the codec from the current locale.
5) test1.pro: Qt pro file used to build test1.cc
6) test2.cc: a test program that shows why Qt fails to detect the correct locale. These two lines are executed by QCoreApplicatio
7) test2.pro: Qt pro file used to build test2.cc
The expected results of test1 are that codecForLocale is set based on LC_ALL to en_US.iso88591:
env LC_ALL=
QTextCodec:
LC_ALL: en_US.iso88591
The actual results on focal are:
env LC_ALL=
QTextCodec:
LC_ALL: en_US.iso88591
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: qtbase5-dev 5.12.8+
ProcVersionSign
Uname: Linux 4.15.0-96-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
Date: Fri Apr 24 14:45:36 2020
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
SourcePackage: qtbase-
UpgradeStatus: No upgrade log present (probably fresh install)