Bug 477283 - System settings marks all "*.utf8" locales as invalid/unsupported, and glibc does not expose "*.UTF-8" variants
Summary: System settings marks all "*.utf8" locales as invalid/unsupported, and glibc ...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: 5.27.9
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 13:49 UTC by Neal Gompa
Modified: 2023-11-29 06:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neal Gompa 2023-11-20 13:49:40 UTC
SUMMARY
When the user sets the locale using the glibc form of UTF-8 locales (e.g. "en_US.utf8"), KDE system settings chokes on it because it only supports IANA variant "UTF-8", and not the glibc variant "utf8".

STEPS TO REPRODUCE
1. Ensure systemwide locale is set to a "lang.utf8" form (which is the form used in the system locale list)
2. Create a fresh user profile and start KDE
3. Go to System Settings > Region & Language > Language

OBSERVED RESULT
"The language "en_US.utf8" is unsupported"

EXPECTED RESULT
The language should be selected and behave normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 39 (KDE Plasma)
(available in About System)
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION
Reference bugs: 
* Sourceware: https://sourceware.org/bugzilla/show_bug.cgi?id=11629
* Fedora/RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2250621
Comment 1 hanyoung 2023-11-20 14:06:58 UTC
Does set LANG to en_US.UTF-8 works correctly? We can implicitly convert "utf8" to "UTF-8"
Comment 2 Hector Martin 2023-11-21 03:26:13 UTC
Yes, UTF-8 works (not utf8, not utf-8, not UTF8).
Comment 3 Bug Janitor Service 2023-11-25 10:13:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3598
Comment 4 hanyoung 2023-11-26 06:22:42 UTC
Git commit 15c7bb2f5710de5dc303dd0963834630d666d907 by Han Young.
Committed on 26/11/2023 at 07:10.
Pushed by hanyoung into branch 'master'.

kcm_regionandlang: support glibc style 'utf8' variant

M  +2    -1    kcms/region_language/regionandlangsettings.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/15c7bb2f5710de5dc303dd0963834630d666d907
Comment 5 hanyoung 2023-11-29 06:54:11 UTC
Git commit c9093f48d8ddc27c824fa00c06811a03692eb010 by Han Young.
Committed on 29/11/2023 at 07:53.
Pushed by hanyoung into branch 'Plasma/5.27'.

kcm_regionandlang: support glibc style 'utf8' variant


(cherry picked from commit 15c7bb2f5710de5dc303dd0963834630d666d907)

M  +2    -1    kcms/region_language/regionandlangsettings.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/c9093f48d8ddc27c824fa00c06811a03692eb010