Skip to content

kcmregionandlang.cpp: Clear baseLocaleMap strings from ".UTF-8" and similar text

Akseli Lahtinen requested to merge work/cherry-pick-5e2c176a into Plasma/6.2

When constructing the baseLocaleMap, we also have the .UTF-8 after the glibcLocale in the map. Later in "fullMatch" iterator this breaks the matching, since we're comparing for example "en_GB" to "en_GB.UTF-8".

They're both the same thing, but since the strings do not match, we do not get the exact values and end up doing a lot of extra work to match the locale to closest possible one with heuristics, even though we have exact match already.

Removing the .UTF-8 and other similar parts from the prefixedLocales list fixes the issue and allows full matching.

BUG:461904 FIXED-IN: 6.2.0

(cherry picked from commit 5e2c176a)

9abdfe55 kcmregionandlang.cpp: Clear baseLocaleMap items from UTF-8 and similar items

Co-authored-by: Akseli Lahtinen akselmo@akselmo.dev

Merge request reports

Loading