setlocale
Aus 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. |
| Defined in header <locale.h>
|
||
| char* setlocale( int category, const char* locale); |
||
Die
setlocale Funktion installiert das angegebene Gebietsschema oder einem Teil davon, wie die neue C locale. Die Änderungen bleiben wirksam und beeinflusst die Ausführung aller locale-sensitive C-Library-Funktionen bis zum nächsten Aufruf setlocale. Wenn locale ein NULL-Zeiger ist, fragt setlocale die aktuelle C locale ohne es zu ändern .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.
Inhaltsverzeichnis |
[Bearbeiten] Parameter
[Bearbeiten] Rückgabewert
Zeiger auf einem schmalen null-terminierten String Identifizierung des C locale nach der Anwendung die Änderungen, falls vorhanden, oder NULL-Zeiger bei Ausfall .
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.
[Bearbeiten] Notes
Während Programmstart, das Äquivalent von setlocale(LC_ALL, "C"); wird ausgeführt, bevor ein Benutzer Code ausgeführt wird .
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.
Obwohl der Rückgabetyp ist char*, Änderung der spitzen-to-Zeichen ist undefiniert .
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.
Weil
setlocale verändert globalen Staat, wirkt Ausführung von locale-abhängige Funktionen ist es nicht definiertes Verhalten, um es von einem Thread nennen, während ein anderer Thread ausgeführt wird eine der folgenden Funktionen: 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.
[Bearbeiten] Beispiel
| This section is incomplete Reason: no example |
[Bearbeiten] Siehe auch
| locale Kategorien für 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. (Makro konstant) | |
| C++ documentation for setlocale
| |