/* $Id: codeset.c 10542 2005-12-31 00:30:38Z lefevre $ * * Output the character encoding (a.k.a. codeset, charmap) used in the * current locale. Same as "locale charmap" under Linux or Solaris, but * also works under Darwin. */ #include #include #include int main (void) { setlocale (LC_ALL, ""); printf ("%s\n", nl_langinfo (CODESET)); return 0; }