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,
17 which are documented separately:
24 For each of these routines, if a NULL
26 is given, the current locale is used.
34 LC_GLOBAL_LOCALE - A special
36 value that corresponds to the global, process-wide locale.
38 MB_CUR_MAX - This macro is traditionally defined as an integer
39 containing the value of the longest multi-byte string
40 that a single-wide character in the global locale can translate into.
41 With extended locales, this macro is replaced with a function
42 that returns the value of the longest multi-byte string
43 that a single-wide character in the current locale (per-thread or global)
46 MB_CUR_MAX_L(loc) - This macro is equivalent to MB_CUR_MAX,
47 except that it may be passed a specific locale directly.
52 function only affects the global locale,
53 so using it when a per-thread locale is in effect
54 will not change locale behavior for that thread.
55 However, it will change behavior for threads
56 with no per-thread locale in effect.
57 #ifdef UNIFDEF_LEGACY_RUNE_APIS
59 The routines defined in
61 are deprecated, and may not be fully consistent with the xlocale API.
64 which would normally modify the value in the global locale.
65 Since this value resides in a sub-structure of
67 and sub-structures may be shared by multiple locales,
69 has been modified to make a copy of the sub-structure.
70 This prevents it from affecting other locales.
71 #endif /* UNIFDEF_LEGACY_RUNE_APIS */
79 .Sh CONVENIENCE FUNCTIONS
80 The xlocale API also includes "convenience functions":
81 functions that can be executed using a given locale,
82 rather than the current locale.
83 These functions all take one extra
85 argument at the end of the traditional argument list,
86 except in the case of variable-argument functions,
87 in which case the extra argument comes before the format string.
90 is passed, the C locale will be used.
93 the convenience functions are listed here
94 (organized by the header file that contains the original function).
96 .Bl -tag -width monetary.h
121 .Xr ishexnumber_l 3 ,
125 .Xr isphonogram_l 3 ,
235 .Xr iswhexnumber_l 3 ,
236 .Xr iswideogram_l 3 ,
238 .Xr iswphonogram_l 3 ,