| NL_LANGINFO(3) | Library Functions Manual | NL_LANGINFO(3) |
nl_langinfo,
nl_langinfo_l — get locale
information
#include
<langinfo.h>
char *
nl_langinfo(nl_item
item);
char *
nl_langinfo_l(nl_item
item, locale_t
locale);
The
nl_langinfo()
function returns information about the global
locale(1), and
nl_langinfo_l()
about the locale passed as an argument.
On OpenBSD, if item
is CODESET, the return value is either
"US-ASCII" or "UTF-8". For other values of
item, the strings that IEEE Std
1003.1-2008 (“POSIX.1”) specifies for the C locale are
returned.
If item is invalid, a pointer to an empty string is returned.
These functions conform to IEEE Std 1003.1-2008 (“POSIX.1”).
The function nl_langinfo() has been
available since NetBSD 1.0, and
nl_langinfo_l() since OpenBSD
6.2.
The return values for CODESET are not
standardized and vary among implementations.
| October 4, 2017 | openbsd |