setlocale
De cppreference.com.
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Défini dans l'entête <locale.h>
|
||
| char* setlocale( int category, const char* locale); |
||
La fonction
setlocale installe les paramètres régionaux système spécifié ou sa partie en tant qu'environnement de nouveau C. Les modifications restent en vigueur et influe sur l'exécution de toutes les fonctions sensibles aux paramètres régionaux de la bibliothèque C jusqu'à ce que le prochain appel à setlocale. Si locale est un pointeur NULL, setlocale interroge la locale C, courant sans le modifier .Original:
The
setlocale function installs the specified system locale or its portion as the new C locale. The modifications remain in effect and influences the execution of all locale-sensitive C library functions until the next call to setlocale. If locale is a null pointer, setlocale queries the current C locale without modifying it.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Sommaire |
[modifier] Paramètres
[modifier] Retourne la valeur
pointeur sur une étroite terminée par NULL chaîne de caractères identifiant la locale C après l'application des modifications, le cas échéant, ou pointeur NULL en cas d'échec .
Original:
pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Notes
Lors du démarrage du programme, l'équivalent de setlocale(LC_ALL, "C"); est exécuté avant tout autre code utilisateur est exécuté .
Original:
During program startup, the equivalent of setlocale(LC_ALL, "C"); is executed before any user code is run.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Bien que le type de retour est char*, modifiant les caractères pointés est un comportement indéfini .
Original:
Although the return type is char*, modifying the pointed-to characters is undefined behavior.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parce que
setlocale modifie mondiale état qui affecte l'exécution des fonctions dépendant des paramètres régionaux, il s'agit d'un comportement non défini pour l'appeler à partir d'un thread, tandis qu'un autre thread exécute l'une des fonctions suivantes: fprintf, isprint, iswdigit, localeconv, tolower, fscanf, ispunct, iswgraph, mblen, toupper, isalnum, isspace, iswlower, mbstowcs, towlower, isalpha, isupper, iswprint, mbtowc, towupper, isblank, iswalnum, iswpunct, setlocale, wcscoll, iscntrl, iswalpha, iswspace, strcoll, wcstod, isdigit, iswblank, iswupper, strerror, wcstombs, isgraph, iswcntrl, iswxdigit, strtod, wcsxfrm, islower, iswctype, isxdigit .Original:
Because
setlocale modifies global state which affects execution of locale-dependent functions, it is undefined behavior to call it from one thread, while another thread is executing any of the following functions: fprintf, isprint, iswdigit, localeconv, tolower, fscanf, ispunct, iswgraph, mblen, toupper, isalnum, isspace, iswlower, mbstowcs, towlower, isalpha, isupper, iswprint, mbtowc, towupper, isblank, iswalnum, iswpunct, setlocale, wcscoll, iscntrl, iswalpha, iswspace, strcoll, wcstod, isdigit, iswblank, iswupper, strerror, wcstombs, isgraph, iswcntrl, iswxdigit, strtod, wcsxfrm, islower, iswctype, isxdigit.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Exemple
| This section is incomplete Reason: no example |
[modifier] Voir aussi
| catégories de locales pour setlocale Original: locale categories for setlocale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante macro) | |
| C++ documentation for setlocale
| |