On Sat, Nov 13, 2010 at 11:50 AM, Jon Steinhart <[email protected]> wrote:
>> Look at the $LANG environment variable, that's probably a good start on most
>> systems. The various LC_ environment variables if you want to do more
>> localization work.
>
> That's the way it is on my Linux system but that doesn't make it standard.

C program to print out current preferred character encoding:

#include <stdio.h>
#include <locale.h>
#include <langinfo.h>
int main()
{
  setlocale(LC_ALL, "");
  printf("%s\n", nl_langinfo(CODESET));
  return 0;
}

--ewh

_______________________________________________
Nmh-workers mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to