LIBRARY
Standard C Library (c.lib, -lc)
SYNOPSIS
#include <locale.h>
DESCRIPTION
The extended locale support includes a set of functions for setting thread-local locales, as well convenience functions for performing locale-aware calls with a specified locale.
The core of the xlocale API is the locale_t type. This is an opaque type encapsulating a locale. Instances of this can be either set as the locale for a specific thread or passed directly to the _l suffixed variants of various standard C functions. Two special locale_t values are available:
- NULL refers to the current locale for the thread, or to the global locale if no locale has been set for this thread.
- LC_GLOBAL_LOCALE refers to the global locale.
The global locale is the locale set with the
Standards Conformance
The functions conform to IEEE Std 1003.1-2008
CAVEATS
The
The NuTCRACKER Platform extends the use of current (function, thread, or global) ctype locale to treat file
names as multi-byte characters
and map them to UNICODE in functions like
SEE ALSO
- Functions:
duplocale() ,freelocale() ,localeconv() ,newlocale() ,querylocale() ,uselocale()
PTC MKS Toolkit UNIX to Windows Porting Guide
CONVENIENCE FUNCTIONS
The xlocale API includes a number of _l suffixed convenience functions. These are variants of standard C functions that have been modified to take an explicit locale_t parameter as the final argument or, in the case of variadic functions, as an additional argument directly before the format string. Each of these functions accepts either NULL or LC_GLOBAL_LOCALE. In these functions, NULL refers to the C locale, rather than the thread's current locale. If you wish to use the thread's current locale, then use the unsuffixed version of the function.
These functions are exposed by including <locale.h> after including the
relevant headers for the standard variant. For example, the
For reference, a complete list of the locale-aware functions that are available in this form, along with the headers that expose them, is provided here:
- <wctype.h>
-
iswalnum_l() ,iswalpha_l() ,iswcntrl_l() ,iswctype_l() ,iswdigit_l() ,iswgraph_l() ,iswlower_l() ,iswprint_l() ,iswpunct_l() ,iswspace_l() ,iswupper_l() ,iswxdigit_l() ,towlower_l() ,towupper_l() ,wctype_l() , - <ctype.h>
-
digittoint_l() ,isalnum_l() ,isalpha_l() ,isblank_l() ,iscntrl_l() ,isdigit_l() ,isgraph_l() ,ishexnumber_l() ,isideogram_l() ,islower_l() ,isnumber_l() ,isphonogram_l() ,isprint_l() ,ispunct_l() ,isrune_l() ,isspace_l() ,isspecial_l() ,isupper_l() ,isxdigit_l() ,tolower_l() ,toupper_l() - <inttypes.h>
- <langinfo.h>
- <stdio.h>
-
asprintf_l() ,fprintf_l() ,fscanf_l() ,printf_l() ,scanf_l() ,snprintf_l() ,sprintf_l() ,sscanf_l() ,vasprintf_l() ,vfprintf_l() ,vfscanf_l() ,vprintf_l() ,vscanf_l() ,vsnprintf_l() ,vsprintf_l() ,vsscanf_l() - <stdlib.h>
-
atof_l() ,atoi_l() ,atol_l() ,atoll_l() ,mblen_l() ,mbstowcs_l() ,mbtowc_l() ,strtod_l() ,strtof_l() ,strtol_l() ,strtold_l() ,strtoll_l() ,strtoq_l() ,strtoul_l() ,strtoull_l() ,strtouq_l() ,wcstombs_l() ,wctomb_l() - <string.h>
-
strcoll_l() ,strxfrm_l() ,strcasecmp_l() ,strcasestr_l() ,strncasecmp_l() - <time.h>
- <wchar.h>
-
btowc_l() ,fgetwc_l() ,fgetws_l() ,fputwc_l() ,fputws_l() ,fwprintf_l() ,fwscanf_l() ,getwc_l() ,getwchar_l() ,mbrlen_l() ,mbrtowc_l() ,mbsinit_l() ,mbsnrtowcs_l() ,mbsrtowcs_l() ,putwc_l() ,putwchar_l() ,swprintf_l() ,swscanf_l() ,ungetwc_l() ,vfwprintf_l() ,vfwscanf_l() ,vswprintf_l() ,vswscanf_l() ,vwprintf_l() ,vwscanf_l() ,wcrtomb_l() ,wcscoll_l() ,wcsftime_l() ,wcsnrtombs_l() ,wcsrtombs_l() ,wcstod_l() ,wcstof_l() ,wcstol_l() ,wcstold_l() ,wcstoll_l() ,wcstoul_l() ,wcstoull_l() ,wcswidth_l() ,wcsxfrm_l() ,wctob_l() ,wcwidth_l() ,wprintf_l() ,wscanf_l() - <wctype.h>
-
iswblank_l() ,iswhexnumber_l() ,iswideogram_l() ,iswnumber_l() ,iswphonogram_l() ,iswrune_l() ,iswspecial_l() ,nextwctype_l() ,towctrans_l() ,wctrans_l() - <xlocale.h>
PTC MKS Toolkit 10.5 Documentation Build 40.