OpenBSD manual page server

Manual Page Search Parameters

NL_LANGINFO(3) Library Functions Manual NL_LANGINFO(3)

nl_langinfo, nl_langinfo_lget locale information

#include <langinfo.h>

char *
nl_langinfo(nl_item item);

char *
nl_langinfo_l(nl_item item, locale_t locale);

The () function returns information about the global locale(1), and () 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.

setlocale(3), uselocale(3)

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-7.1