#include <errno.h>
#include <locale.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
  char *ctype = argv[1];
  char *messages = argv[2];
  setlocale(LC_CTYPE, ctype);
  setlocale(LC_MESSAGES, messages);

  printf("LC_CTYPE set to: %s\n", setlocale(LC_CTYPE, NULL));
  printf("LC_MESSAGES set to: %s\n", setlocale(LC_MESSAGES, NULL));

  /* EILSEQ: illegal byte sequence */
  printf("Error message (from strerror(EILSEQ)): %s\n", strerror(EILSEQ));
  return 0;
}
