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, "");
to select a locale based on the user choice of the appropriate environment variables.
Re:[tech brain][технота]
https://www.gnu.org/software/libc/manual/html_node/Setting-the-Locale.html#Setting-the-Locale
Emacs-w3m/1.4.503 w3m/0.5.3