/* $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 <stdio.h>
#include <locale.h>
#include <langinfo.h>

int main (void)
{
  setlocale (LC_ALL, "");
  printf ("%s\n", nl_langinfo (CODESET));
  return 0;
}
