Questions tagged [locale]

A locale is a set of parameters that defines the user's language, country and any special variant preferences that the user wants to see in their user interface.

Further reading:

509 questions
474
votes
6 answers

What does "LC_ALL=C" do?

What does the C value for LC_ALL do in Unix-like systems? I know that it forces the same locale for all aspects but what does C do?
jcubic
  • 9,612
  • 16
  • 54
  • 75
132
votes
7 answers

Why is there no "Euro English" locale?

I used to use the somewhat whimsical en_DK.UTF-8 locale when installing a new system because that would produce (roughly) the locale results I wanted, even though I am not in Denmark. Measurements metric Sensible date and time formats, but day and…
tripleee
  • 7,506
  • 2
  • 32
  • 42
93
votes
5 answers

Problem of Can't set locale; make sure $LC_* and $LANG are correct!

When I always try to install new package I get this message: Can't set locale; make sure $LC_* and $LANG are correct! perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_GB:en", LC_ALL…
Ismail Sensei
  • 1,179
  • 1
  • 10
  • 13
56
votes
3 answers

What charset encoding is used for filenames and paths on Linux?

Does it depend on what file system I use? For example, ext2/ext3/ext4 but also what happens when I insert one of those "joliet" CD-ROMs with ISO 9660? I've heard that POSIX contains some sort of spec for the charset encoding of…
martin
  • 561
  • 1
  • 4
  • 3
46
votes
5 answers

Updated my arch linux server and now I get tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968

I recently updated my Arch Linux server and during that process tmux got updated. I was using tmux while the upgrade was going on and used it afterwards, but all during the same SSH session. Now, however, whenever I try to issue any tmux command I…
RPiAwesomeness
  • 980
  • 2
  • 8
  • 10
46
votes
7 answers

Why does [A-Z] match lowercase letters in bash?

In all shells I am aware of, rm [A-Z]* removes all files that start with an uppercase letter, but with bash this removes all files that start with a letter. As this problem exists on Linux and Solaris with bash-3 and bash-4, it cannot be a bug…
schily
  • 18,806
  • 5
  • 38
  • 60
37
votes
4 answers

locale not found/setting locale failed - what should I do?

I've installed Debian 7 i386 on my VPS (OpenVZ). Everything works fine, except locales - any attempt to install anything shows: [...] perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE =…
krzaczor93
  • 545
  • 1
  • 4
  • 6
35
votes
2 answers

What is the difference between LANG=C and LC_ALL=C?

I like to disable all locale specific differences in shell scripts. What is the preferred way to do it? LANG=C or LC_ALL=C
ceving
  • 3,461
  • 5
  • 21
  • 30
33
votes
2 answers

Which is the current decimal separator?

Say I have a POSIX shell script that needs to run on different systems/environments that I do not control, and needs to remove the decimal separator from a string that is emitted by a program that respects the locale settings. How can I detect…
gboffi
  • 1,220
  • 1
  • 14
  • 30
31
votes
5 answers

How can I make “ls” show dotfiles first while staying case-insensitive?

Create the following files in a directory. $ touch .a .b a b A B 你好嗎 My default ls order ignores the presence of leading dots, intermingling them with the other files. $ ls -Al total 0 -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 a -rw-r--r-- 1…
Sparhawk
  • 19,561
  • 18
  • 86
  • 152
31
votes
2 answers

Does (should) LC_COLLATE affect character ranges?

Collation order through LC_COLLATE defines not only the sort order of individual characters, but also the meaning of character ranges. Or does it? Consider the following snippet: unset LANGUAGE LC_ALL echo B | LC_COLLATE=en_US grep…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
29
votes
3 answers

What's the default order of Linux sort?

For a long period I thought the default behavior of the sort program was using ASCII order. However, when I input the following lines into sort without any arguments: # @ I got: @ # But according to the ASCII table, # is 35 and @ is 64. Another…
old_bear
29
votes
5 answers

Why is almost every program complaining about my locale?

I'm using Arch Linux, and I've followed the directions on the wiki about setting my locale. Nearly every program that runs complains about the locale - even locale. It looks like this: % locale locale: Cannot set LC_ALL to default locale: No such…
Shawn J. Goff
  • 45,338
  • 25
  • 134
  • 145
29
votes
4 answers

How do I make ls sort underscore characters first?

I like being able to name files and directories with an underscore prefix if it's something I want to keep separate from other files and directories at the same level. On Windows and Mac, for example, prefixing a file with an underscore sorts it to…
Tom Auger
  • 584
  • 2
  • 6
  • 11
27
votes
3 answers

Why does sort say that ɛ = e?

ɛ ("Latin epsilon") is a letter used in certain African languages, usually to represent the vowel sound in English "bed". In Unicode it's encoded as U+025B, very distinct from everyday e. However, if I sort the following: eb ed ɛa ɛc it seems that…
Draconis
  • 666
  • 5
  • 14
1
2 3
33 34