NL_LANGINFO(3)

NAME
nl_langinfo, nl_langinfo_l - get locale information

SYNOPSIS
#include <langinfo.h>
char *
nl_langinfo(nl_item item);
char *
nl_langinfo(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.

SEE ALSO
setlocale(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.

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