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?


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? 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. Oct 21 '20 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.