localeconv---select or query locale
#include <locale.h> char *setlocale(int category, const char *locale); lconv *localeconv(void); char *_setlocale_r(void *reent, int category, const char *locale); lconv *_localeconv_r(void *reent);
setlocale is the facility defined by ANSI C to condition the
execution environment for international collating and formatting
localeconv reports on the settings of the current
This is a minimal implementation, supporting only the required
value for locale; strings representing other locales are not
"" is also accepted; it represents the default locale
for an implementation, here equivalent to
If you use
NULL as the locale argument,
a pointer to the string representing the current locale (always
"C" in this implementation). The acceptable values for
category are defined in `
locale.h' as macros beginning with
"LC_", but this implementation does not check the values you pass
in the category argument.
localeconv returns a pointer to a structure (also defined in
locale.h') describing the locale-specific conventions currently
_setlocale_r are reentrant versions of
setlocale respectively. The extra argument
reent is a pointer to a reentrancy structure.
setlocale returns either a pointer to a string naming the locale
currently in effect (always
"C" for this implementation), or, if
the locale request cannot be honored,
localeconv returns a pointer to a structure of type
which describes the formatting and collating conventions in effect (in
this implementation, always those of the C locale).
ANSI C requires
setlocale, but the only locale required across all
implementations is the C locale.
No supporting OS subroutines are required.
Go to the first, previous, next, last section, table of contents.