Messed up locale

I have Plasma desktop (Fedora 41 KDE spin) and have set en_SE.UTF8 in the settings for time format in order to have ISO 8601 dates and times.

enter image description here

This is the output of locale:

➜  locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME=en_SE.UTF-8
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

But now whenever I start R I get:

During startup - Warning message:
Setting LC_TIME failed, using "C"

LC_TIME=en_GB works to get weeks starting on Monday.

Note the difference in the last parts.
utf8 vs UTF-8

Thank.
Indeed one is capital and the other isn’t.
Is there a solution ot my problem?
Also perl and latex gives me locale problems.
It is vey frustating.

More than that, one contains a hyphen -
NONE of the others contain a hyphen.

Run locale -a to get a list of valid locales. On my system, there is no “en_SE” locale, but there is a “en_DK.UTF_8” and that is quite nearby.

1 Like

Exactly, en_SE.UTF-8 is a ‘fake’ locale that isn’t part of glibc. Some distros may ship with it, but it’s often added manually by users looking for an ISO-8601 locale.

FWIW, I recently learned that glibc normalizes locale endings by converting to lowercase and removing punctuation, so en_US.UTF-8 and en_US.utf8 are equivalent.

1 Like

Thank you very much for pointing out the typographical differences.
I’m switching back to Windows.
I don’t have time to fix the PC every now and then