Created attachment 140752 [details] An example of a locale configured while the system does not support it SUMMARY I could not find a dedicated Bugzilla project for plasma-workspace, so I filed it here; I'm sorry if this is incorrect. Plasma lists *all* locales in its Formats KCM (System Settings -> Regional Settings -> Formats), even ones which are not supported by the underlying system, unlike the Language KCM. Setting one of these unsupported locales breaks some software which relies on proper locale configuration and causes warnings in others. For example, Minecraft's launcher no longer launches and crashes, and DNF throws warnings. STEPS TO REPRODUCE 1. Open the Formats KCM; 2. Set an unsupported locale by your system, for example nl_EN; 3. Restart your session and observe application behaviour. OBSERVED RESULT The Minecraft launcher breaks and DNF and other programs throw locale errors. > Failed to set locale, defaulting to C.UTF-8 EXPECTED RESULT Plasma should not break the locale settings the way it currently does and all programs should continue working. SOFTWARE/OS VERSIONS Operating System: Fedora 34 KDE Plasma Version: 5.22.4 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 Kernel Version: 5.13.9-200.fc34.x86_64 (64-bit) Graphics Platform: X11 Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz Memory: 15,4 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 5500 ADDITIONAL INFORMATION From what I could find in the repos, the Formats KCM relies on the output of QLocale::matchingLocales: https://invent.kde.org/plasma/plasma-workspace/-/blob/master/kcms/formats/kcmformats.cpp#L72 This method, https://doc.qt.io/qt-5/qlocale.html#matchingLocales , in turn relies on a list of locale data built in to Qt: https://github.com/qt/qtbase/blob/dev/src/corelib/text/qlocale_data_p.h#L79-L88 A possible solution therefore would be to filter the list given by Qt on locales known by the system. On top of this, Plasma itself seems to not have any issues with the locale and seems to honour it quite well. So another thought would be to set the system locale to C.UTF-8 or something similar if the selected locale is not supported, and maybe show a warning to the user?
Thanks for investigating already! Please do feel free to submit a merge request to fix it. Your idea seems reasonable to me.
*** Bug 441468 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 403580 ***