Fails to recognize UTF-8 locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Low
|
Unassigned |
Bug Description
Forwarding from https:/
The command "LC_ALL=en_IN.UTF-8 snap list" (assuming the terminal is set to UTF-8) prints green ticks in the "Publisher" column, as expected.
The command "LC_ALL=en_IN snap list" prints green asterisks instead. Expected: green ticks, just as before.
Both locales are UTF-8, as confirmed for the latter one by "LC_ALL=en_IN locale charmap"
I assume UTF-8 support is detected by searching for the substring "UTF-8" in the locale related environment variables, which is bad practice.
In order to detect UTF-8, the equivalent of the "locale charmap" command should be executed, that is, setlocale(...) followed by nl_langinfo(
snapd version 2.38+19.04 on Ubuntu 19.04.
See also bug 1830052 for a related issue.