

解决 Arch Linux(KDE Plasma)中 Locale LANG=C 的问题
source link: https://cyrusyip.org/post/2021/10/08/lang-c-in-arch-linux-kde-plasma/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

解决 Arch Linux(KDE Plasma)中 Locale LANG=C 的问题
最近在 Arch Linux 上的 Git 显示不了中文,执行了 git config --global core.quotepath false
还是不行。git log
显示的中文变成这样了:
Markdown <E6><8A><80><E5><B7><A7><EF><BC><9A>Rmarkdown -> R Markdown
它应该是这样的:
Markdown 技巧:Rmarkdown -> R Markdown
查看 locale,发现 locale 居然不是en_US.UTF-8,而是 C,这是啥啊?
❯ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
我之前设置的 locale 明明是 en_US.UTF-8。
sudo localectl set-locale LANG=en_US.UTF-8
查阅万能的 ArchWiki 后发现我似乎在 KDE Plasma 把 locale 设置成 Default (C) 了(System Settings -> Regional Settings -> Formats -> Region)。
❯ cat ~/.config/plasma-localerc
[Formats]
LANG=C
把 Plasma 的 locale 配置文件删除后重启就行了。
rm -i ~/.config/plasma-localerc
Recommend
-
44
I am trying to install package and doing some other work. But, getting the error that read as “ perl: warning: Setting loc...
-
10
Currency internationalizationApril 22, 2020 · 2 min readMaksim SharipovMaintainer of eo-locale
-
11
PHP RFC: Locale-independent float to string cast Version: 1.0 Date: 2020-03-11
-
10
Open Bug 331779 Opened 15 years ago Updated 2 years ago
-
5
ubuntu 下设置 locale 报错 $ /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory $ /usr/b...
-
261
warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory ...
-
7
How to Set Locale and Add-Type in Krayin? You can change language and time zone from the Krayin CRM configuration setting. Here I wil...
-
5
Changing the Locale in Chrome with Dev Tools Mar 09, 2022 When working on internationalized apps, it's important to test different locales to ensure that the design looks acceptable for a wide range...
-
4
This post is part of my Byte Series, where I document tips, tricks, and tools that I've found useful.ProblemWhen building a localized JavaScript web-app, the default so...
-
2
KDE Plasma 6 Desktop Cube in Arch Linux Leave a reply ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK