config.charset 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. #! /bin/sh
  2. # Output a system dependent table of character encoding aliases.
  3. #
  4. # Copyright (C) 2000-2001 Free Software Foundation, Inc.
  5. #
  6. # This program is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU Library General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # Library General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Library General Public
  17. # License along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  19. # USA.
  20. #
  21. # The table consists of lines of the form
  22. # ALIAS CANONICAL
  23. #
  24. # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
  25. # ALIAS is compared in a case sensitive way.
  26. #
  27. # CANONICAL is the GNU canonical name for this character encoding.
  28. # It must be an encoding supported by libiconv. Support by GNU libc is
  29. # also desirable. CANONICAL is case insensitive. Usually an upper case
  30. # MIME charset name is preferred.
  31. # The current list of GNU canonical charset names is as follows.
  32. #
  33. # name used by which systems a MIME name?
  34. # ASCII, ANSI_X3.4-1968 glibc solaris freebsd
  35. # ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
  36. # ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
  37. # ISO-8859-3 glibc yes
  38. # ISO-8859-4 osf solaris freebsd yes
  39. # ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
  40. # ISO-8859-6 glibc aix hpux solaris yes
  41. # ISO-8859-7 glibc aix hpux irix osf solaris yes
  42. # ISO-8859-8 glibc aix hpux osf solaris yes
  43. # ISO-8859-9 glibc aix hpux irix osf solaris yes
  44. # ISO-8859-13 glibc
  45. # ISO-8859-15 glibc aix osf solaris freebsd
  46. # KOI8-R glibc solaris freebsd yes
  47. # KOI8-U glibc freebsd yes
  48. # CP437 dos
  49. # CP775 dos
  50. # CP850 aix osf dos
  51. # CP852 dos
  52. # CP855 dos
  53. # CP856 aix
  54. # CP857 dos
  55. # CP861 dos
  56. # CP862 dos
  57. # CP864 dos
  58. # CP865 dos
  59. # CP866 freebsd dos
  60. # CP869 dos
  61. # CP874 win32 dos
  62. # CP922 aix
  63. # CP932 aix win32 dos
  64. # CP943 aix
  65. # CP949 osf win32 dos
  66. # CP950 win32 dos
  67. # CP1046 aix
  68. # CP1124 aix
  69. # CP1129 aix
  70. # CP1250 win32
  71. # CP1251 glibc win32
  72. # CP1252 aix win32
  73. # CP1253 win32
  74. # CP1254 win32
  75. # CP1255 win32
  76. # CP1256 win32
  77. # CP1257 win32
  78. # GB2312 glibc aix hpux irix solaris freebsd yes
  79. # EUC-JP glibc aix hpux irix osf solaris freebsd yes
  80. # EUC-KR glibc aix hpux irix osf solaris freebsd yes
  81. # EUC-TW glibc aix hpux irix osf solaris
  82. # BIG5 glibc aix hpux osf solaris freebsd yes
  83. # BIG5-HKSCS glibc
  84. # GBK aix osf win32 dos
  85. # GB18030 glibc
  86. # SHIFT_JIS hpux osf solaris freebsd yes
  87. # JOHAB glibc win32
  88. # TIS-620 glibc aix hpux osf solaris
  89. # VISCII glibc yes
  90. # HP-ROMAN8 hpux
  91. # HP-ARABIC8 hpux
  92. # HP-GREEK8 hpux
  93. # HP-HEBREW8 hpux
  94. # HP-TURKISH8 hpux
  95. # HP-KANA8 hpux
  96. # DEC-KANJI osf
  97. # DEC-HANYU osf
  98. # UTF-8 glibc aix hpux osf solaris yes
  99. #
  100. # Note: Names which are not marked as being a MIME name should not be used in
  101. # Internet protocols for information interchange (mail, news, etc.).
  102. #
  103. # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
  104. # must understand both names and treat them as equivalent.
  105. #
  106. # The first argument passed to this file is the canonical host specification,
  107. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  108. # or
  109. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  110. host="$1"
  111. os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
  112. echo "# This file contains a table of character encoding aliases,"
  113. echo "# suitable for operating system '${os}'."
  114. echo "# It was automatically generated from config.charset."
  115. # List of references, updated during installation:
  116. echo "# Packages using this file: "
  117. case "$os" in
  118. linux* | *-gnu*)
  119. # With glibc-2.1 or newer, we don't need any canonicalization,
  120. # because glibc has iconv and both glibc and libiconv support all
  121. # GNU canonical names directly. Therefore, the Makefile does not
  122. # need to install the alias file at all.
  123. # The following applies only to glibc-2.0.x and older libcs.
  124. echo "ISO_646.IRV:1983 ASCII"
  125. ;;
  126. aix*)
  127. echo "ISO8859-1 ISO-8859-1"
  128. echo "ISO8859-2 ISO-8859-2"
  129. echo "ISO8859-5 ISO-8859-5"
  130. echo "ISO8859-6 ISO-8859-6"
  131. echo "ISO8859-7 ISO-8859-7"
  132. echo "ISO8859-8 ISO-8859-8"
  133. echo "ISO8859-9 ISO-8859-9"
  134. echo "ISO8859-15 ISO-8859-15"
  135. echo "IBM-850 CP850"
  136. echo "IBM-856 CP856"
  137. echo "IBM-921 ISO-8859-13"
  138. echo "IBM-922 CP922"
  139. echo "IBM-932 CP932"
  140. echo "IBM-943 CP943"
  141. echo "IBM-1046 CP1046"
  142. echo "IBM-1124 CP1124"
  143. echo "IBM-1129 CP1129"
  144. echo "IBM-1252 CP1252"
  145. echo "IBM-eucCN GB2312"
  146. echo "IBM-eucJP EUC-JP"
  147. echo "IBM-eucKR EUC-KR"
  148. echo "IBM-eucTW EUC-TW"
  149. echo "big5 BIG5"
  150. echo "GBK GBK"
  151. echo "TIS-620 TIS-620"
  152. echo "UTF-8 UTF-8"
  153. ;;
  154. hpux*)
  155. echo "iso88591 ISO-8859-1"
  156. echo "iso88592 ISO-8859-2"
  157. echo "iso88595 ISO-8859-5"
  158. echo "iso88596 ISO-8859-6"
  159. echo "iso88597 ISO-8859-7"
  160. echo "iso88598 ISO-8859-8"
  161. echo "iso88599 ISO-8859-9"
  162. echo "iso885915 ISO-8859-15"
  163. echo "roman8 HP-ROMAN8"
  164. echo "arabic8 HP-ARABIC8"
  165. echo "greek8 HP-GREEK8"
  166. echo "hebrew8 HP-HEBREW8"
  167. echo "turkish8 HP-TURKISH8"
  168. echo "kana8 HP-KANA8"
  169. echo "tis620 TIS-620"
  170. echo "big5 BIG5"
  171. echo "eucJP EUC-JP"
  172. echo "eucKR EUC-KR"
  173. echo "eucTW EUC-TW"
  174. echo "hp15CN GB2312"
  175. #echo "ccdc ?" # what is this?
  176. echo "SJIS SHIFT_JIS"
  177. echo "utf8 UTF-8"
  178. ;;
  179. irix*)
  180. echo "ISO8859-1 ISO-8859-1"
  181. echo "ISO8859-2 ISO-8859-2"
  182. echo "ISO8859-5 ISO-8859-5"
  183. echo "ISO8859-7 ISO-8859-7"
  184. echo "ISO8859-9 ISO-8859-9"
  185. echo "eucCN GB2312"
  186. echo "eucJP EUC-JP"
  187. echo "eucKR EUC-KR"
  188. echo "eucTW EUC-TW"
  189. ;;
  190. osf*)
  191. echo "ISO8859-1 ISO-8859-1"
  192. echo "ISO8859-2 ISO-8859-2"
  193. echo "ISO8859-4 ISO-8859-4"
  194. echo "ISO8859-5 ISO-8859-5"
  195. echo "ISO8859-7 ISO-8859-7"
  196. echo "ISO8859-8 ISO-8859-8"
  197. echo "ISO8859-9 ISO-8859-9"
  198. echo "ISO8859-15 ISO-8859-15"
  199. echo "cp850 CP850"
  200. echo "big5 BIG5"
  201. echo "dechanyu DEC-HANYU"
  202. echo "dechanzi GB2312"
  203. echo "deckanji DEC-KANJI"
  204. echo "deckorean EUC-KR"
  205. echo "eucJP EUC-JP"
  206. echo "eucKR EUC-KR"
  207. echo "eucTW EUC-TW"
  208. echo "GBK GBK"
  209. echo "KSC5601 CP949"
  210. echo "sdeckanji EUC-JP"
  211. echo "SJIS SHIFT_JIS"
  212. echo "TACTIS TIS-620"
  213. echo "UTF-8 UTF-8"
  214. ;;
  215. solaris*)
  216. echo "646 ASCII"
  217. echo "ISO8859-1 ISO-8859-1"
  218. echo "ISO8859-2 ISO-8859-2"
  219. echo "ISO8859-4 ISO-8859-4"
  220. echo "ISO8859-5 ISO-8859-5"
  221. echo "ISO8859-6 ISO-8859-6"
  222. echo "ISO8859-7 ISO-8859-7"
  223. echo "ISO8859-8 ISO-8859-8"
  224. echo "ISO8859-9 ISO-8859-9"
  225. echo "ISO8859-15 ISO-8859-15"
  226. echo "koi8-r KOI8-R"
  227. echo "BIG5 BIG5"
  228. echo "gb2312 GB2312"
  229. echo "cns11643 EUC-TW"
  230. echo "5601 EUC-KR"
  231. echo "eucJP EUC-JP"
  232. echo "PCK SHIFT_JIS"
  233. echo "TIS620.2533 TIS-620"
  234. #echo "sun_eu_greek ?" # what is this?
  235. echo "UTF-8 UTF-8"
  236. ;;
  237. freebsd*)
  238. # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
  239. # localcharset.c falls back to using the full locale name
  240. # from the environment variables.
  241. echo "C ASCII"
  242. echo "US-ASCII ASCII"
  243. for l in la_LN lt_LN; do
  244. echo "$l.ASCII ASCII"
  245. done
  246. for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
  247. fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
  248. lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
  249. echo "$l.ISO_8859-1 ISO-8859-1"
  250. echo "$l.DIS_8859-15 ISO-8859-15"
  251. done
  252. for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
  253. echo "$l.ISO_8859-2 ISO-8859-2"
  254. done
  255. for l in la_LN lt_LT; do
  256. echo "$l.ISO_8859-4 ISO-8859-4"
  257. done
  258. for l in ru_RU ru_SU; do
  259. echo "$l.KOI8-R KOI8-R"
  260. echo "$l.ISO_8859-5 ISO-8859-5"
  261. echo "$l.CP866 CP866"
  262. done
  263. echo "uk_UA.KOI8-U KOI8-U"
  264. echo "zh_TW.BIG5 BIG5"
  265. echo "zh_TW.Big5 BIG5"
  266. echo "zh_CN.EUC GB2312"
  267. echo "ja_JP.EUC EUC-JP"
  268. echo "ja_JP.SJIS SHIFT_JIS"
  269. echo "ja_JP.Shift_JIS SHIFT_JIS"
  270. echo "ko_KR.EUC EUC-KR"
  271. ;;
  272. beos*)
  273. # BeOS has a single locale, and it has UTF-8 encoding.
  274. echo "* UTF-8"
  275. ;;
  276. msdosdjgpp*)
  277. # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
  278. # localcharset.c falls back to using the full locale name
  279. # from the environment variables.
  280. echo "#"
  281. echo "# The encodings given here may not all be correct."
  282. echo "# If you find that the encoding given for your language and"
  283. echo "# country is not the one your DOS machine actually uses, just"
  284. echo "# correct it in this file, and send a mail to"
  285. echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
  286. echo "# and Bruno Haible <haible@clisp.cons.org>."
  287. echo "#"
  288. echo "C ASCII"
  289. # ISO-8859-1 languages
  290. echo "ca CP850"
  291. echo "ca_ES CP850"
  292. echo "da CP865" # not CP850 ??
  293. echo "da_DK CP865" # not CP850 ??
  294. echo "de CP850"
  295. echo "de_AT CP850"
  296. echo "de_CH CP850"
  297. echo "de_DE CP850"
  298. echo "en CP850"
  299. echo "en_AU CP850" # not CP437 ??
  300. echo "en_CA CP850"
  301. echo "en_GB CP850"
  302. echo "en_NZ CP437"
  303. echo "en_US CP437"
  304. echo "en_ZA CP850" # not CP437 ??
  305. echo "es CP850"
  306. echo "es_AR CP850"
  307. echo "es_BO CP850"
  308. echo "es_CL CP850"
  309. echo "es_CO CP850"
  310. echo "es_CR CP850"
  311. echo "es_CU CP850"
  312. echo "es_DO CP850"
  313. echo "es_EC CP850"
  314. echo "es_ES CP850"
  315. echo "es_GT CP850"
  316. echo "es_HN CP850"
  317. echo "es_MX CP850"
  318. echo "es_NI CP850"
  319. echo "es_PA CP850"
  320. echo "es_PY CP850"
  321. echo "es_PE CP850"
  322. echo "es_SV CP850"
  323. echo "es_UY CP850"
  324. echo "es_VE CP850"
  325. echo "et CP850"
  326. echo "et_EE CP850"
  327. echo "eu CP850"
  328. echo "eu_ES CP850"
  329. echo "fi CP850"
  330. echo "fi_FI CP850"
  331. echo "fr CP850"
  332. echo "fr_BE CP850"
  333. echo "fr_CA CP850"
  334. echo "fr_CH CP850"
  335. echo "fr_FR CP850"
  336. echo "ga CP850"
  337. echo "ga_IE CP850"
  338. echo "gd CP850"
  339. echo "gd_GB CP850"
  340. echo "gl CP850"
  341. echo "gl_ES CP850"
  342. echo "id CP850" # not CP437 ??
  343. echo "id_ID CP850" # not CP437 ??
  344. echo "is CP861" # not CP850 ??
  345. echo "is_IS CP861" # not CP850 ??
  346. echo "it CP850"
  347. echo "it_CH CP850"
  348. echo "it_IT CP850"
  349. echo "lt CP775"
  350. echo "lt_LT CP775"
  351. echo "lv CP775"
  352. echo "lv_LV CP775"
  353. echo "nb CP865" # not CP850 ??
  354. echo "nb_NO CP865" # not CP850 ??
  355. echo "nl CP850"
  356. echo "nl_BE CP850"
  357. echo "nl_NL CP850"
  358. echo "nn CP865" # not CP850 ??
  359. echo "nn_NO CP865" # not CP850 ??
  360. echo "no CP865" # not CP850 ??
  361. echo "no_NO CP865" # not CP850 ??
  362. echo "pt CP850"
  363. echo "pt_BR CP850"
  364. echo "pt_PT CP850"
  365. echo "sv CP850"
  366. echo "sv_SE CP850"
  367. # ISO-8859-2 languages
  368. echo "cs CP852"
  369. echo "cs_CZ CP852"
  370. echo "hr CP852"
  371. echo "hr_HR CP852"
  372. echo "hu CP852"
  373. echo "hu_HU CP852"
  374. echo "pl CP852"
  375. echo "pl_PL CP852"
  376. echo "ro CP852"
  377. echo "ro_RO CP852"
  378. echo "sk CP852"
  379. echo "sk_SK CP852"
  380. echo "sl CP852"
  381. echo "sl_SI CP852"
  382. echo "sq CP852"
  383. echo "sq_AL CP852"
  384. echo "sr CP852" # CP852 or CP866 or CP855 ??
  385. echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
  386. # ISO-8859-3 languages
  387. echo "mt CP850"
  388. echo "mt_MT CP850"
  389. # ISO-8859-5 languages
  390. echo "be CP866"
  391. echo "be_BE CP866"
  392. echo "bg CP866" # not CP855 ??
  393. echo "bg_BG CP866" # not CP855 ??
  394. echo "mk CP866" # not CP855 ??
  395. echo "mk_MK CP866" # not CP855 ??
  396. echo "ru KOI8-R" # not CP866 ??
  397. echo "ru_RU KOI8-R" # not CP866 ??
  398. # ISO-8859-6 languages
  399. echo "ar CP864"
  400. echo "ar_AE CP864"
  401. echo "ar_DZ CP864"
  402. echo "ar_EG CP864"
  403. echo "ar_IQ CP864"
  404. echo "ar_IR CP864"
  405. echo "ar_JO CP864"
  406. echo "ar_KW CP864"
  407. echo "ar_MA CP864"
  408. echo "ar_OM CP864"
  409. echo "ar_QA CP864"
  410. echo "ar_SA CP864"
  411. echo "ar_SY CP864"
  412. # ISO-8859-7 languages
  413. echo "el CP869"
  414. echo "el_GR CP869"
  415. # ISO-8859-8 languages
  416. echo "he CP862"
  417. echo "he_IL CP862"
  418. # ISO-8859-9 languages
  419. echo "tr CP857"
  420. echo "tr_TR CP857"
  421. # Japanese
  422. echo "ja CP932"
  423. echo "ja_JP CP932"
  424. # Chinese
  425. echo "zh_CN GBK"
  426. echo "zh_TW CP950" # not CP938 ??
  427. # Korean
  428. echo "kr CP949" # not CP934 ??
  429. echo "kr_KR CP949" # not CP934 ??
  430. # Thai
  431. echo "th CP874"
  432. echo "th_TH CP874"
  433. # Other
  434. echo "eo CP850"
  435. echo "eo_EO CP850"
  436. ;;
  437. esac