New module 'setlocale'.
[gnulib.git] / doc / posix-functions / setlocale.texi
1 @node setlocale
2 @section @code{setlocale}
3 @findex setlocale
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/setlocale.html}
6
7 Gnulib module: setlocale
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 On Windows platforms (excluding Cygwin), @code{setlocale(@var{category},NULL)}
13 ignores the environment variables @code{LC_ALL}, @code{@var{category}}, and
14 @code{LANG}.
15 @item
16 On Windows platforms (excluding Cygwin), @code{setlocale} understands different
17 locale names, that are not based on ISO 639 language names and ISO 3166 country
18 names.
19 @end itemize
20
21 Portability problems not fixed by Gnulib:
22 @itemize
23 @item
24 On Cygwin 1.5.x, which doesn't have locales,
25 @code{setlocale(LC_ALL,NULL)} always returns @code{"C"}.
26 @item
27 On Cygwin 1.7.0, only the charset portion of a locale designation is honored.
28 @item
29 On Windows platforms (excluding Cygwin), @code{setlocale(LC_ALL,@var{name})}
30 succeeds and sets the LC_CTYPE category to @samp{C} when it does not support
31 the encoding, instead of failing.
32 @end itemize