Return to all-charsets CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / libiconv / libcharset / tools |
1.1 ! misho 1: #! /bin/sh ! 2: ! 3: # Prints a table of the charsets (system dependent name and portable name) ! 4: # for all locales. ! 5: ! 6: ${CC-cc} -o locale_codeset locale_codeset.c ! 7: ${CC-cc} -o locale_charset -I../include locale_charset.c \ ! 8: -DHAVE_CONFIG_H -I.. -DLIBDIR='"'`cd ../lib && pwd`'"' \ ! 9: ../lib/localcharset.c ! 10: ! 11: printf '%-15s%-17s%-17s %-17s\n\n' \ ! 12: "locale name" "locale charmap" "nl_langinfo(CODESET)" "locale_charset()" ! 13: for lc in `./all-locales | sort | uniq` ! 14: do ! 15: charmap=`LC_ALL=$lc ./locale_charmap 2>/dev/null || echo '<error>'` ! 16: codeset=`LC_ALL=$lc ./locale_codeset 2>/dev/null || echo '<error>'` ! 17: charset=`LC_ALL=$lc ./locale_charset 2>/dev/null || echo '<error>'` ! 18: case "$charset" in ! 19: ASCII | ANSI_X3.4-1968 | \ ! 20: ISO-8859-1 | ISO-8859-2 | ISO-8859-3 | ISO-8859-4 | ISO-8859-5 | ISO-8859-6 | \ ! 21: ISO-8859-7 | ISO-8859-8 | ISO-8859-9 | ISO-8859-13 | ISO-8859-14 | ISO-8859-15 | \ ! 22: KOI8-R | KOI8-U | KOI8-T | \ ! 23: CP437 | CP775 | CP850 | CP852 | CP855 | CP856 | CP857 | CP861 | CP862 | CP864 | CP865 | CP866 | CP869 | CP874 | CP922 | CP932 | CP943 | CP949 | CP950 | CP1046 | CP1124 | CP1125 | CP1129 | CP1131 | \ ! 24: CP1250 | CP1251 | CP1252 | CP1253 | CP1254 | CP1255 | CP1256 | CP1257 | \ ! 25: GB2312 | EUC-JP | EUC-KR | EUC-TW | BIG5 | BIG5-HKSCS | GBK | GB18030 | SHIFT_JIS | JOHAB | \ ! 26: TIS-620 | VISCII | TCVN5712-1 | ARMSCII-8 | GEORGIAN-PS | PT154 | \ ! 27: HP-ROMAN8 | HP-ARABIC8 | HP-GREEK8 | HP-HEBREW8 | HP-TURKISH8 | HP-KANA8 | \ ! 28: DEC-KANJI | DEC-HANYU | \ ! 29: UTF-8 ) comment="";; ! 30: * ) comment="bug";; ! 31: esac ! 32: printf '%-15s %-17s %-17s %-17s %s\n' \ ! 33: "$lc" "$charmap" "$codeset" "$charset" "$comment" ! 34: done