Standards / Extensions | C or C++ | Dependencies |
---|---|---|
C Library | both |
#include <stdlib.h>
int wcsid(const wchar_t c)
Determines the character set identifier for the specified wide character.
To avoid infringing on the user's name space, this nonstandard function has two names. One name is prefixed with two underscore characters, and one name is not. The name without the prefix underscore characters is exposed only when you use LANGLVL(EXTENDED).
To use this function, you must either invoke the function using its external entry point name (that is, the name that begins with two underscore characters), or compile with LANGLVL(EXTENDED). When you use LANGLVL(EXTENDED) any relevant information in the header is also exposed.
If successful, wcsid() returns the character set identifier for the wide character.
If the wide character is not valid, wcsid() returns -1.
⁄* CELEBW11
This example checks character set id for wide character.
*⁄
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
main() {
wchar_t wc = L'A';
int rc;
rc = wcsid(wc);
printf("wide character '%lc' is in character set id %i\n", wc, rc);
}