Is the default locale of a program in *nix "posix"? Is the default locale of a program in *nix "posix"? unix unix

Is the default locale of a program in *nix "posix"?


Looking at the man

7.4 How Programs Set the Locale

A C program inherits its locale environment variables when it starts up. This happens automatically. However, these variables do not automatically control the locale used by the library functions, because ISO C says that all programs start by default in the standard ā€˜Cā€™ locale. To use the locales specified by the environment, you must call setlocale. Call it as follows:

setlocale (LC_ALL, "");

Emphasis mine