5

We are using several Ubuntu servers having English as working language; however having en_US locale set in machines we encounter problems with apt-cacher-ng downloading translation files. One solution is to change locale to POSIX. Considering all options we want to change locale in all the systems.

What are the consequences for the system of changing locales from en_US value to POSIX? Are there any implications on LC_* apart from change of the value?

Braiam
  • 35,991
Kris
  • 51
  • Change the default system locale, for all processes of all users? Or just change the locale of apt-cacher-ng? The latter is less risky, I think. – Toby Speight Jun 10 '15 at 11:18
  • Are you perhaps actually looking for https://unix.stackexchange.com/questions/62316/why-is-there-no-euro-english-locale? – tripleee Apr 22 '17 at 06:01

1 Answers1

4

See What should I set my locale to and what are the implications of doing so? for a full overview of locale settings. In a nutshell, the one useful difference between C and en_US is the LC_CTYPE setting: C restricts applications to ASCII while en_US allows latin1. A good setting for a US English environment is to set LC_CTYPE=en_US.UTF-8, specifying the UTF-8 encoding of the Unicode character set which is the de facto standard character encoding nowadays; and leave other settings unset (which is equivalent to C (or POSIX which is synonymous)).

  • "C restricts applications to ASCII while en_US allows latin1"? In how far? With "C" in effect, on the systems that I use, latin1-encoded text usually displays as intended. In my experience, when input is processed, C means "use the bytes as they are". Maybe you mean the text generated by applications. Yes, with C in effect I would expect that to be limited to ASCII. Can you elaborate? – Rainer Blome Oct 21 '20 at 12:16
  • @RainerBlome For example: If you have a terminal that defaults to UTF-8 (which is pretty common these days), attempting to display latin1 won't display the characters as intended. If you search for [[:alpha:]] with grep, it won't find é. If you try to process file in a program written in Python that expects a text file, it'll crank out on non-ASCII characters. – Gilles 'SO- stop being evil' Oct 21 '20 at 14:47