Bug 28278 - Broken LC_CTYPE in nds_DE locale
Summary: Broken LC_CTYPE in nds_DE locale
Status: RESOLVED NOTABUG
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: 2.33
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-27 09:07 UTC by Benedikt Straub
Modified: 2021-08-27 11:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed: 2021-08-27 00:00:00
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benedikt Straub 2021-08-27 09:07:05 UTC
Hi,

I'm using Ubuntu MATE 21.04 with the Low German (nds_DE) system locale. With the default settings for this locale I'm unable to type non-ASCII characters such as äöüß in many applications.
The cause appears to be that /usr/share/i18n/locales/nds_DE defines LC_CTYPE to en_DK which looks very weird. Manually exporting LC_CTYPE=de_DE.UTF-8 fixes the bug for me.

I don't see why this is not the default setting. Most other LC_* variables use the de_DE definition by default in nds_DE. Is this a bug, or is there a reason why it's done this way?

Best regards and thanks in advance :)

---
P.S. I hope this is the right place for this topic; if not, please feel free to point out where this belongs. The ubuntu package search told me my locales are provided by the package `locales` which is provided by package `glibc` version `2.33-0ubuntu5`. Original question was at https://answers.launchpad.net/ubuntu/+source/glibc/+question/698525.

P.P.S. I'm also surprised that the locale definition uses the localized language name "Neddersass'sch" although "Plattdüütsch" and "Plattdütsch" are far more common forms. Nice to speak a language that can't decide on it's own name. But that just as a side note :) Should I open a separate bug report for this?
Comment 1 Florian Weimer 2021-08-27 09:41:21 UTC
What does this command show?

LC_ALL=nds_DE locale -k charmap

The expected output is:

charmap="UTF-8"
Comment 2 Benedikt Straub 2021-08-27 09:58:31 UTC
$ LC_ALL=nds_DE locale -k charmap
charmap="UTF-8"

$ LC_ALL=de_DE locale -k charmap
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
charmap="ANSI_X3.4-1968"

$ LC_ALL=C locale -k charmap
charmap="ANSI_X3.4-1968"
Comment 3 Florian Weimer 2021-08-27 10:08:59 UTC
This looks good. It's possible that these applications do not recognize nds_DE as a UTF-8 locale. They should use nl_langinfo (CODESET) to determine the character set, but they probably use some other, ad-hoc mechanism.

I do not think this is a glibc bug, sorry.
Comment 4 Benedikt Straub 2021-08-27 11:05:02 UTC
I assume the bug is probably in SDL2 then… I opened a new issue there: https://github.com/libsdl-org/SDL/issues/4699