29

In order to turn off localisation features one should set the LANG environment variable to "C".

Why "C"? Where did it come from?

Vi.
  • 16,755
  • 32
  • 111
  • 189

1 Answers1

40

In the C programming language, the locale name C “specifies the minimal environment for C translation” (C99 §7.11.1.1; the principle has been the same since at least the 1980s). As most operating systems are written in C, especially the Unix-inspired ones where locales are set through the LANG and LC_xxx environment variables, C ends up being the name of a “safe” locale everywhere.

POSIX specifies that both C and POSIX must be valid locale names, with the same neutral settings.

jaume
  • 5,487
  • 1
  • 26
  • 33
Gilles 'SO- stop being evil'
  • 69,786
  • 21
  • 137
  • 178