NL_LANGINFO(3)

NAME
nl_langinfo, nl_langinfo_l - get locale information

SYNOPSIS
#include <langinfo.h>
char *
nl_langinfo(nl_item item);
#include <xlocale.h>
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 p1003.1-2008 specifies for the C locale are returned.

If item is invalid, a pointer to an empty string is returned.

ERRORS
Regarding CRNCYSTR from http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html it is not clear how to detect when to use '.' (i.e currency symbol replaces radix char). Such information is not present at http://unicode.org/cldr/trac/browser/tags/release-1-9/posix/.

FreeBSD implements p_cs_precedes == CHAR_MAX to mean that currency symbol replaces radix char.

SEE ALSO
setlocale(3), xlocale(3) uselocale(3)

STANDARDS
These functions conform to p1003.1-2008.

HISTORY
The function nl_langinfo() has been available since NetBSD 1.0, and nl_langinfo_l() since OpenBSD 6.2 and since adJ 5.4.

BUGS
The return values for CODESET are not standardized and vary among implementations.