6 .Nd Extended locale support.
12 for extended locale support.
13 It can be used alone or with the POSIX locale API in
16 The extended locale, or "xlocale" API consists of five basic routines, which are documented separately:
23 For each of these routines, if a NULL
25 is given, the current locale is used.
33 LC_GLOBAL_LOCALE - A special
35 value that corresponds to the global, process-wide locale.
37 MB_CUR_MAX - This macro is traditionally defined as an integer containing the value of the
38 longest multi-byte string that a single-wide character in the global locale
40 With extended locales, this macro is replaced with a function that returns the
41 value of the longest multi-byte string that a single-wide character in the current
42 locale (per-thread or global) can translate into.
44 MB_CUR_MAX_L(loc) - This macro is equivalent to MB_CUR_MAX, except that it may be passed
45 a specific locale directly.
50 function only affects the global locale, so using it when a per-thread locale
51 is in effect will not change locale behavior for that thread. However, it will
52 change behavior for threads with no per-thread locale in effect.
54 The routines defined in
56 are deprecated, and may not be fully consistent with the xlocale API.
59 which would normally modify the value in the global locale.
60 Since this value resides in a sub-structure of
62 and sub-structures may be shared by multiple locales,
64 has been modified to make a copy of the sub-structure.
65 This prevents it from affecting other locales.
73 .Sh CONVENIENCE FUNCTIONS
74 The xlocale API also includes "convenience functions"; functions that can be
75 executed using a given locale, rather than the current locale. These functions all take one extra
77 argument at the end of the traditional argument list, except in the case of variable-argument functions, in which case the extra argument comes before the format string.
80 is passed, the C locale will be used.
83 the convenience functions are listed here (organized by the header file that contains the original function).
85 .Bl -tag -width monetary.h
110 .Xr ishexnumber_l 3 ,
114 .Xr isphonogram_l 3 ,
224 .Xr iswhexnumber_l 3 ,
225 .Xr iswideogram_l 3 ,
227 .Xr iswphonogram_l 3 ,