Bug 362865 - Plasma forces my character encoding to US-ASCII
Summary: Plasma forces my character encoding to US-ASCII
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_formats (show other bugs)
Version: 5.5.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-09 19:52 UTC by Guido Winkelmann
Modified: 2021-10-06 07:45 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Winkelmann 2016-05-09 19:52:25 UTC
After doing any changes to the the regional settings to set a system language, plasma will set a locale that explicitly ends with .US-ASCII, even though my system locale is UTF-8, and even though I don't even have any US-ASCII locales installed. I cannot find a way to set the encoding back to UTF-8.

This is at the very least a usability issue.

I have tried setting LANG=de_DE.utf8 (which is the locale I actually want) in .bashrc. This causes shells started from KDE to run with that locale, but the rest of KDE still runs on US-ASCII. This is particularly noticable in the file manager, which now cannot properly display a lot of the filenames in my home directory.

Reproducible: Always

Steps to Reproduce:
1. Set language under "Regional Settings" in System Settings application
2. Restart Plasma

Actual Results:  
Plasma runs with a locale set to <that language>.US_ASCII, for example de_DE.US-ASCII or en_US.US-ASCII, depending on what language I picked.

Expected Results:  
Plasma should if at all possible run with the UTF-8 version of the selected locale.
Comment 1 Alexander Mentyu 2017-11-27 16:06:53 UTC
Cannot confirm this bug - after changing 'Region' settings in 'Formats' settings module - it always changes to UTF-8 variant - checked with 'locale' command in Konsole
Comment 2 Andreas Freimuth 2018-10-14 09:07:00 UTC
I can reproduce this with the current Debain Testing Packages.

Googleing for "plasma-localerc us-ascii" shows there are a some more users have that problem, On Gentoo, Fedora, FreeBSD, Arch and Debian.

How can I help to fix this?

When I remove ~/.config/plasma-localerc and ~/.config/plasma-locale-settings.sh, new files are Created with 'LANG=en_US.UTF-8'  and the settings are as follows:

$ localectl list-locales
C.UTF-8
de_DE.utf8
en_GB.utf8
en_US.utf8
ja_JP.utf8

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

But as soon as I change the language in the Regional Settings it uses US-ASCII for what ever language I select.
Comment 3 Nate Graham 2021-10-05 17:21:03 UTC
Git commit 25485ac8d35ec25c1cf1475516016d6f8b93a9f2 by Nate Graham, on behalf of Han Young.
Committed on 05/10/2021 at 17:20.
Pushed by ngraham into branch 'master'.

port formats to qml
Related: bug 279658, bug 338599, bug 389529, bug 410606, bug 422467, bug 426313

FIXED-IN: 5.24

M  +16   -7    kcms/formats/CMakeLists.txt
D  +0    -113  kcms/formats/formats.desktop
M  +46   -326  kcms/formats/kcmformats.cpp
M  +15   -33   kcms/formats/kcmformats.h
D  +0    -385  kcms/formats/kcmformatswidget.ui

https://invent.kde.org/plasma/plasma-workspace/commit/25485ac8d35ec25c1cf1475516016d6f8b93a9f2
Comment 4 Ben Cooksley 2021-10-06 07:45:02 UTC
Git commit 32a565bae7e2f7243d2715df56b8617dc8dd3612 by Ben Cooksley, on behalf of Han Young.
Committed on 06/10/2021 at 07:41.
Pushed by bcooksley into branch 'master'.

kcms/formats: port to QML
Related: bug 279658, bug 338599, bug 389529, bug 410606, bug 422467, bug 426313

FIXED-IN: 5.24

M  +16   -7    kcms/formats/CMakeLists.txt
A  +66   -0    kcms/formats/exampleutility.cpp     [License: GPL(v2.0+)]
D  +0    -113  kcms/formats/formats.desktop
A  +61   -0    kcms/formats/formatssettings.kcfg
A  +6    -0    kcms/formats/formatssettings.kcfgc
M  +46   -326  kcms/formats/kcmformats.cpp
M  +15   -33   kcms/formats/kcmformats.h
D  +0    -385  kcms/formats/kcmformatswidget.ui
A  +176  -0    kcms/formats/localelistmodel.cpp     [License: GPL (v2+)]
A  +58   -0    kcms/formats/localelistmodel.h     [License: GPL (v2+)]
A  +140  -0    kcms/formats/optionsmodel.cpp     [License: GPL(v2.0+)]
A  +32   -0    kcms/formats/optionsmodel.h     [License: GPL(v2.0+)]
A  +126  -0    kcms/formats/package/contents/ui/main.qml     [License: LGPL(v3.0+)]
A  +23   -0    kcms/formats/package/metadata.desktop

https://invent.kde.org/plasma/plasma-workspace/commit/32a565bae7e2f7243d2715df56b8617dc8dd3612