Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 8
Select a program's locale
#include <locale.h>
char * setlocale( int category,
const char * locale );
- category
- The part of the environment that you want to set; one of:
- LC_ALL — select the entire locale environment.
- LC_COLLATE — select only the collating sequence.
- LC_CTYPE — select only the character-handling
information.
- LC_MESSAGES — specify the language to be used
for messages.
- LC_MONETARY — select only monetary formatting
information.
- LC_NUMERIC — select only the numeric-format
environment.
- LC_TIME — select only the time-related environment.
- locale
- The locale that you want to use.
The following built-in locales are offered:
- C (default)
- C-TRADITIONAL
- POSIX
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The setlocale() function selects a program's
locale, according to the specified category
and the specified locale.
A locale affects several things:
- The collating sequence (the order in which characters compare
with one another) used by
strcoll() or
wcscoll().
- The way certain character-handling functions (such as
isalnum() and
isalpha()) operate.
The wide-character versions include iswalnum() and
iswalpha().
- The decimal-point character used in formatted
input/output and string conversion
(printf(),
scanf(), and
friends).
- The format and names used in the string produced by the
strftime() and
wcsftime() functions.
See the localeconv()
function for more information about the locale.
At the start of a program, the default C locale is
initialized as if the following call to setlocale()
appeared at the start of
main():
(void)setlocale( LC_ALL, "C" );
The string associated with the specified category for the new
locale, or
NULL if an error occurs. This function doesn't
change the program's locale when error occurs.
|
For a NULL pointer of locale, this function returns a pointer to the string
associated with the category for the
program's current locale. This function doesn't change the
program's locale. |
ANSI,
POSIX 1003.1
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
isalpha(),
isascii(),
localeconv(),
printf(),
scanf(),
strcat(),
strchr(),
strcmp(),
strcoll(),
strcpy(),
strftime(),
strlen(),
strpbrk(),
strspn(),
strtod(),
strtok(),
strxfrm(),
tm
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 239
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setlocale.html on line 239