How to find encoding type of UNIX system? - Unix

This is a discussion on How to find encoding type of UNIX system? - Unix ; Is there any method can get UNIX system encoding type directly? For those locale names without encoding postfix,such as zh_CN,is there something like a map table for the default encoding type used?...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to find encoding type of UNIX system?

  1. How to find encoding type of UNIX system?

    Is there any method can get UNIX system encoding type directly?

    For those locale names without encoding postfix,such as zh_CN,is there
    something like a map table for the default encoding type used?



  2. Re: How to find encoding type of UNIX system?

    I find the solution
    char *loc;
    loc= setlocale(LC_ALL,"");
    setlocale(LC_ALL,loc);
    printf("Code page:%s.", nl_langinfo(CODESET));

    "Yingying Zhao" 写入消息新闻:gdk2n0$4up$1@foggy.unx.sas.com...
    > Is there any method can get UNIX system encoding type directly?
    >
    > For those locale names without encoding postfix,such as zh_CN,is there
    > something like a map table for the default encoding type used?
    >




+ Reply to Thread