NAME
nl_langinfo
,
nl_langinfo_l
—
get locale information
SYNOPSIS
#include
<langinfo.h>
char *
nl_langinfo
(nl_item
item);
char *
nl_langinfo_l
(nl_item
item, locale_t
locale);
DESCRIPTION
The
nl_langinfo
()
function returns information about the global
locale(1),
and
nl_langinfo_l
()
about the locale passed as an argument.
RETURN VALUES
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.
SEE ALSO
STANDARDS
These functions conform to IEEE Std 1003.1-2008 (“POSIX.1”).
HISTORY
The function nl_langinfo
() has been
available since NetBSD 1.0, and
nl_langinfo_l
() since OpenBSD
6.2.
BUGS
The return values for CODESET
are not
standardized and vary among implementations.