csid -- Determine Character Set ID for Multibyte Character

Format

#include <stdlib.h>
int csid(const char *c);

Language Level: Extension
csid queries the locale and determines the character-set identifier for the specified character c.

Return Value
csid returns the character-set identifier, or -1 if the character is not valid.

Example
This example checks the character-set ID for a character.

#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
   char *string = "A";
   int   rc;
   rc = csid(string);
   printf("character '%s' is in character set id %i\n", string, rc);
   return 0;
   /****************************************************************
      The output should be similar to:
      character 'A' is in character set id 0
   ****************************************************************/
}



wcsid -- Determine Character Set ID for Wide Character
<stdlib.h>