summaryrefslogtreecommitdiff
path: root/jni/iconv/libcharset/tools/locale_codeset.c
blob: a9c209d6d0fe1bafc6c5c20960197822ce3789b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Prints the system dependent name for the current locale's codeset. */

#define _XOPEN_SOURCE 500  /* Needed on AIX 3.2.5 */

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <langinfo.h>

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