SETLOCALE(3) Linux Programmer’s Manual SETLOCALE(3)
NAME
setlocale - set the current locale
SYNOPSIS
#include <locale.h>
char *setlocale(int category, const char *locale);
DESCRIPTION
The setlocale() function is used to set or query the program’s current
locale.
NL_LANGINFO(3) Linux Programmer’s Manual NL_LANGINFO(3)
NAME
nl_langinfo - query language and locale information
SYNOPSIS
#include <langinfo.h>
char *nl_langinfo(nl_item item);
DESCRIPTION
The nl_langinfo() function provides access to locale information in a
more flexible way than localeconv(3) does. Individual and additional
elements of the locale categories can be queried. setlocale(3) needs
to be executed with proper arguments before.
Examples for the locale elements that can be specified in item using
the constants defined in <langinfo.h> are:
CODESET (LC_CTYPE)
Return a string with the name of the character encoding used in
the selected locale, such as "UTF-8", "ISO-8859-1", or
"ANSI_X3.4-1968" (better known as US-ASCII). This is the same
string that you get with "locale charmap". For a list of char‐
acter encoding names, try "locale -m", cf. locale(1).