69
votes
Accepted
Why does sort say that ɛ = e?
No, it doesn't consider them as equivalent, they just have the same primary weight. So that, in first approximation, they sort the same.
If you look at /usr/share/i18n/locales/iso14651_t1_common (as ...
51
votes
Accepted
Which is the current decimal separator?
Ask locale:
locale decimal_point
This will output the decimal point using the current locale settings.
If you need the thousands separator:
locale thousands_sep
You can view all the numeric keywords ...
49
votes
Accepted
What is the difference between LANG=C and LC_ALL=C?
LANG sets the default locale, i.e. the locale used when no more specific setting (LC_COLLATE, LC_NUMERIC, LC_TIME etc.) is provided; it doesn’t override any setting, it provides the base value. LC_ALL ...
38
votes
Problem of Can't set locale; make sure $LC_* and $LANG are correct!
The top-rated solution didn't help in my case, so I used this one:
export LC_ALL="en_US.UTF-8"
sudo dpkg-reconfigure locales
After that, I logged out and logged in and error was missing.
28
votes
When I'm typing a text in English, it gets underlined and behaves bizarrely
I also had this same issue (Arch XFCE). Basically what happens is it switches input methods whenever you press Shift+Space, which frequently accidentally happens when typing. To fix this, you have to ...
21
votes
Accepted
How can I make “ls” show dotfiles first while staying case-insensitive?
OP was very close with editing /usr/share/i18n/locales/iso14651_t1_common, but the trick is not to delete the line
<U002E> IGNORE;IGNORE;IGNORE;<U002E> # 47 .
but rather to modify it to
...
18
votes
Accepted
Is "warning: range of the form `[o-b]' is locale dependent" a bug in gawk 4.1.0?
This is a bug in Gawk 4.1.0 specifically. It was introduced by a7c502a756732ec9a1773d6169376bb7b25f4308 and fixed by d52d17b46e53bb0d4a991cd32f859eb349d3b101. The bug was first released in 4.1.0 and ...
17
votes
Accepted
Debian 9: How to set English language with German Locale?
en_DE doesn’t exist as a default locale, so you can’t select English localised for German-speaking countries as a locale during installation. (Why should one use update-locale instead of directly ...
15
votes
Problem of Can't set locale; make sure $LC_* and $LANG are correct!
If you're having this issue on a raspberry pi (or other?) and you're getting the error when you ssh to the pi there are 2 other solutions
One is edit /etc/ssh/sshd_config on the pi and comment out ...
15
votes
Accepted
Why does the bash translation file not contain all error texts?
The string comes from strerror(3), which maps error numbers to messages. In this case, it's mapping EACCES. The strings (and their translations) are contained in your C library.
15
votes
Why does sort say that ɛ = e?
man sort:
*** WARNING *** The locale specified by the environment affects sort
order. Set LC_ALL=C to get the traditional sort order that uses native
byte values.
So, try: LC_ALL=C sort ...
15
votes
What is the difference between LANG=C and LC_ALL=C?
LANG does not override:
$ export LC_NUMERIC="de_DE.UTF-8"
$ export LANG=C
$ printf "%.2f\n" 3.14
-bash: printf: 3.14: invalid number
3,00
But LC_ALL does:
$ export LC_NUMERIC="de_DE.UTF-8"
$ export ...
14
votes
Problem of Can't set locale; make sure $LC_* and $LANG are correct!
These commands saved my life
# echo "LC_ALL=en_US.UTF-8" >> /etc/environment
# echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
# echo "LANG=en_US.UTF-8" > /etc/locale.conf
# locale-gen ...
14
votes
What are collating symbols and equivalence classes used for?
Collating symbols and equivalence classes are used in locale definitions to encode complex ordering information. POSIX has the details, but in summary:
a collating symbol represents a set of ...
14
votes
Accepted
Case sensitivity in square-bracket globbing
In bash version 4.3 and later, there is a shopt option called globasciiranges :
According to shopt builtin gnu man pages:
globasciiranges
If set, range expressions used in pattern matching
...
13
votes
Accepted
Sort LC_ALL=C vs LC_ALL=C.utf8
LC_ALL=C sort sorts by byte value. It will sort any input written in any charset by byte value, not only ASCII¹.
The UTF-8 encoding has that property that sorting by byte value is the same as sorting ...
12
votes
Change LANG variable in current shell
Several things are required for that to work:
the it_IT.UTF-8 locale has to be available on the system. Check locale -a | grep it
the Italian translation for the corresponding application has to be ...
12
votes
awk doesn't recognize field as a number
The problem is that you have LC_NUMERIC=fr_BE.UTF-8. Under this locale, the decimal separator is , and not . so 98.9 is not considered a number. To illustrate:
$ echo "98.5" | LC_NUMERIC=C ...
11
votes
Accepted
"-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
What your terminal is doing
The "rectangles with the numbers in [them]" are the way that your terminal emulator is displaying a terminal control sequence to you, because it doesn't recognize that ...
11
votes
Accepted
What is VC keymap?
The VC is the virtual console which is also known as a virtual terminal VT. It is the full screen tty you might see before X11 launches (or switch to with Ctrl+Alt+2). It has its own keymap ...
11
votes
Accepted
"sort -g" does not work as expected on data in scientific notation
2.3e-12 would be understood as 2 in a locale where the decimal radix character is , (as it is in most of the non-English speaking world including your de_DE.utf8) where the number would need to be ...
11
votes
How can I install new locales for Debian?
If you only want some of the locales, run dpkg-reconfigure locales as root and select the locales you want.
Or just edit /etc/locale.gen which has a long list of commented-out locales by default. ...
10
votes
Accepted
Arch Linux: Failed to set locale. Fix your system
One of your locale settings (namely, LC_TIME) is set to a locale that you have not generated (namely, en_GB.UTF-8). The error will go away if you enable that locale in /etc/locale.gen and regenerate ...
10
votes
Accepted
How widespread is the C.UTF-8 locale?
It's "hit or miss" (it largely depends on the propensity of developers to copy features from other systems versus filling missing bits from a standard):
As suggested by Tom Hale, Arch Linux ...
10
votes
Accepted
Why do some Linux utilities output Unicode (when it is not expected)?
It has everything to do with your system locale as it describes how utilities should output locale specific symbols and their combinations, e.g. ‘’ instead of "".
If you don't want this, use ...
10
votes
What is "modifier" in locale name?
There is no single unified meaning for the modifier. For example, in the early 2000s, when parts of the EU transitioned from their own national currencies to the Euro, the @euro modifier was used to ...
10
votes
What value for LANG should I use for "sort -u“ correctly handle Chinese characters?
sort -u outputs one of each set of lines that collate the same (have identical sorting order) in the locale.
On GNU systems (systems using the GNU libc), in most locales, many characters¹ have an ...
10
votes
"bash: warning: setlocale: LC_ALL: cannot change locale" - misleading? What does it mean?
Your warning suggests that the locales you are requesting have not actually been compiled. So, you should use:
sudo dpkg-reconfigure locales
to select the locales to compile.
Alternatively, just edit ...
9
votes
Accepted
loadlocale.c _nl_intern_locale_data assertion error
I figured out a solution, big thanks to these posts:
https://stackoverflow.com/questions/37121895/yocto-build-loadlocale-c-130
Problem of Can't set locale; make sure $LC_* and $LANG are correct!
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
locale × 529debian × 83
unicode × 51
linux × 47
character-encoding × 44
bash × 38
sort × 35
arch-linux × 32
date × 26
language × 25
centos × 23
ubuntu × 19
environment-variables × 17
terminal × 16
i18n × 15
shell × 14
ls × 14
linux-mint × 13
kde × 13
macos × 13
posix × 12
xfce × 11
x11 × 10
gnome × 10
man × 10