config.charset 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. #! /bin/sh
  2. # Output a system dependent table of character encoding aliases.
  3. #
  4. # Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # 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
  14. # GNU Lesser General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Lesser General Public License along
  17. # with this program; if not, write to the Free Software Foundation,
  18. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. #
  20. # The table consists of lines of the form
  21. # ALIAS CANONICAL
  22. #
  23. # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
  24. # ALIAS is compared in a case sensitive way.
  25. #
  26. # CANONICAL is the GNU canonical name for this character encoding.
  27. # It must be an encoding supported by libiconv. Support by GNU libc is
  28. # also desirable. CANONICAL is case insensitive. Usually an upper case
  29. # MIME charset name is preferred.
  30. # The current list of GNU canonical charset names is as follows.
  31. #
  32. # name MIME? used by which systems
  33. # ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
  34. # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  35. # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  36. # ISO-8859-3 Y glibc solaris cygwin
  37. # ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
  38. # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
  39. # ISO-8859-6 Y glibc aix hpux solaris cygwin
  40. # ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
  41. # ISO-8859-8 Y glibc aix hpux osf solaris cygwin
  42. # ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin
  43. # ISO-8859-13 glibc netbsd openbsd darwin cygwin
  44. # ISO-8859-14 glibc cygwin
  45. # ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
  46. # KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
  47. # KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
  48. # KOI8-T glibc
  49. # CP437 dos
  50. # CP775 dos
  51. # CP850 aix osf dos
  52. # CP852 dos
  53. # CP855 dos
  54. # CP856 aix
  55. # CP857 dos
  56. # CP861 dos
  57. # CP862 dos
  58. # CP864 dos
  59. # CP865 dos
  60. # CP866 freebsd netbsd openbsd darwin dos
  61. # CP869 dos
  62. # CP874 woe32 dos
  63. # CP922 aix
  64. # CP932 aix cygwin woe32 dos
  65. # CP943 aix
  66. # CP949 osf darwin woe32 dos
  67. # CP950 woe32 dos
  68. # CP1046 aix
  69. # CP1124 aix
  70. # CP1125 dos
  71. # CP1129 aix
  72. # CP1131 darwin
  73. # CP1250 woe32
  74. # CP1251 glibc solaris netbsd openbsd darwin cygwin woe32
  75. # CP1252 aix woe32
  76. # CP1253 woe32
  77. # CP1254 woe32
  78. # CP1255 glibc woe32
  79. # CP1256 woe32
  80. # CP1257 woe32
  81. # GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
  82. # EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
  83. # EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
  84. # EUC-TW glibc aix hpux irix osf solaris netbsd
  85. # BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
  86. # BIG5-HKSCS glibc solaris darwin
  87. # GBK glibc aix osf solaris darwin cygwin woe32 dos
  88. # GB18030 glibc solaris netbsd darwin
  89. # SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
  90. # JOHAB glibc solaris woe32
  91. # TIS-620 glibc aix hpux osf solaris cygwin
  92. # VISCII Y glibc
  93. # TCVN5712-1 glibc
  94. # ARMSCII-8 glibc darwin
  95. # GEORGIAN-PS glibc cygwin
  96. # PT154 glibc
  97. # HP-ROMAN8 hpux
  98. # HP-ARABIC8 hpux
  99. # HP-GREEK8 hpux
  100. # HP-HEBREW8 hpux
  101. # HP-TURKISH8 hpux
  102. # HP-KANA8 hpux
  103. # DEC-KANJI osf
  104. # DEC-HANYU osf
  105. # UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
  106. #
  107. # Note: Names which are not marked as being a MIME name should not be used in
  108. # Internet protocols for information interchange (mail, news, etc.).
  109. #
  110. # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
  111. # must understand both names and treat them as equivalent.
  112. #
  113. # The first argument passed to this file is the canonical host specification,
  114. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  115. # or
  116. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  117. host="$1"
  118. os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
  119. echo "# This file contains a table of character encoding aliases,"
  120. echo "# suitable for operating system '${os}'."
  121. echo "# It was automatically generated from config.charset."
  122. # List of references, updated during installation:
  123. echo "# Packages using this file: "
  124. case "$os" in
  125. linux-gnulibc1*)
  126. # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
  127. # localcharset.c falls back to using the full locale name
  128. # from the environment variables.
  129. echo "C ASCII"
  130. echo "POSIX ASCII"
  131. for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
  132. en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
  133. en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
  134. es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
  135. et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
  136. fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
  137. it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
  138. sv_FI sv_SE; do
  139. echo "$l ISO-8859-1"
  140. echo "$l.iso-8859-1 ISO-8859-1"
  141. echo "$l.iso-8859-15 ISO-8859-15"
  142. echo "$l.iso-8859-15@euro ISO-8859-15"
  143. echo "$l@euro ISO-8859-15"
  144. echo "$l.cp-437 CP437"
  145. echo "$l.cp-850 CP850"
  146. echo "$l.cp-1252 CP1252"
  147. echo "$l.cp-1252@euro CP1252"
  148. #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
  149. echo "$l.utf-8 UTF-8"
  150. echo "$l.utf-8@euro UTF-8"
  151. done
  152. for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
  153. sl_SI sr sr_CS sr_YU; do
  154. echo "$l ISO-8859-2"
  155. echo "$l.iso-8859-2 ISO-8859-2"
  156. echo "$l.cp-852 CP852"
  157. echo "$l.cp-1250 CP1250"
  158. echo "$l.utf-8 UTF-8"
  159. done
  160. for l in mk mk_MK ru ru_RU; do
  161. echo "$l ISO-8859-5"
  162. echo "$l.iso-8859-5 ISO-8859-5"
  163. echo "$l.koi8-r KOI8-R"
  164. echo "$l.cp-866 CP866"
  165. echo "$l.cp-1251 CP1251"
  166. echo "$l.utf-8 UTF-8"
  167. done
  168. for l in ar ar_SA; do
  169. echo "$l ISO-8859-6"
  170. echo "$l.iso-8859-6 ISO-8859-6"
  171. echo "$l.cp-864 CP864"
  172. #echo "$l.cp-868 CP868" # not a commonly used encoding
  173. echo "$l.cp-1256 CP1256"
  174. echo "$l.utf-8 UTF-8"
  175. done
  176. for l in el el_GR gr gr_GR; do
  177. echo "$l ISO-8859-7"
  178. echo "$l.iso-8859-7 ISO-8859-7"
  179. echo "$l.cp-869 CP869"
  180. echo "$l.cp-1253 CP1253"
  181. echo "$l.cp-1253@euro CP1253"
  182. echo "$l.utf-8 UTF-8"
  183. echo "$l.utf-8@euro UTF-8"
  184. done
  185. for l in he he_IL iw iw_IL; do
  186. echo "$l ISO-8859-8"
  187. echo "$l.iso-8859-8 ISO-8859-8"
  188. echo "$l.cp-862 CP862"
  189. echo "$l.cp-1255 CP1255"
  190. echo "$l.utf-8 UTF-8"
  191. done
  192. for l in tr tr_TR; do
  193. echo "$l ISO-8859-9"
  194. echo "$l.iso-8859-9 ISO-8859-9"
  195. echo "$l.cp-857 CP857"
  196. echo "$l.cp-1254 CP1254"
  197. echo "$l.utf-8 UTF-8"
  198. done
  199. for l in lt lt_LT lv lv_LV; do
  200. #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
  201. echo "$l ISO-8859-13"
  202. done
  203. for l in ru_UA uk uk_UA; do
  204. echo "$l KOI8-U"
  205. done
  206. for l in zh zh_CN; do
  207. #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
  208. echo "$l GB2312"
  209. done
  210. for l in ja ja_JP ja_JP.EUC; do
  211. echo "$l EUC-JP"
  212. done
  213. for l in ko ko_KR; do
  214. echo "$l EUC-KR"
  215. done
  216. for l in th th_TH; do
  217. echo "$l TIS-620"
  218. done
  219. for l in fa fa_IR; do
  220. #echo "$l ISIRI-3342" # a broken encoding
  221. echo "$l.utf-8 UTF-8"
  222. done
  223. ;;
  224. linux* | *-gnu*)
  225. # With glibc-2.1 or newer, we don't need any canonicalization,
  226. # because glibc has iconv and both glibc and libiconv support all
  227. # GNU canonical names directly. Therefore, the Makefile does not
  228. # need to install the alias file at all.
  229. # The following applies only to glibc-2.0.x and older libcs.
  230. echo "ISO_646.IRV:1983 ASCII"
  231. ;;
  232. aix*)
  233. echo "ISO8859-1 ISO-8859-1"
  234. echo "ISO8859-2 ISO-8859-2"
  235. echo "ISO8859-5 ISO-8859-5"
  236. echo "ISO8859-6 ISO-8859-6"
  237. echo "ISO8859-7 ISO-8859-7"
  238. echo "ISO8859-8 ISO-8859-8"
  239. echo "ISO8859-9 ISO-8859-9"
  240. echo "ISO8859-15 ISO-8859-15"
  241. echo "IBM-850 CP850"
  242. echo "IBM-856 CP856"
  243. echo "IBM-921 ISO-8859-13"
  244. echo "IBM-922 CP922"
  245. echo "IBM-932 CP932"
  246. echo "IBM-943 CP943"
  247. echo "IBM-1046 CP1046"
  248. echo "IBM-1124 CP1124"
  249. echo "IBM-1129 CP1129"
  250. echo "IBM-1252 CP1252"
  251. echo "IBM-eucCN GB2312"
  252. echo "IBM-eucJP EUC-JP"
  253. echo "IBM-eucKR EUC-KR"
  254. echo "IBM-eucTW EUC-TW"
  255. echo "big5 BIG5"
  256. echo "GBK GBK"
  257. echo "TIS-620 TIS-620"
  258. echo "UTF-8 UTF-8"
  259. ;;
  260. hpux*)
  261. echo "iso88591 ISO-8859-1"
  262. echo "iso88592 ISO-8859-2"
  263. echo "iso88595 ISO-8859-5"
  264. echo "iso88596 ISO-8859-6"
  265. echo "iso88597 ISO-8859-7"
  266. echo "iso88598 ISO-8859-8"
  267. echo "iso88599 ISO-8859-9"
  268. echo "iso885915 ISO-8859-15"
  269. echo "roman8 HP-ROMAN8"
  270. echo "arabic8 HP-ARABIC8"
  271. echo "greek8 HP-GREEK8"
  272. echo "hebrew8 HP-HEBREW8"
  273. echo "turkish8 HP-TURKISH8"
  274. echo "kana8 HP-KANA8"
  275. echo "tis620 TIS-620"
  276. echo "big5 BIG5"
  277. echo "eucJP EUC-JP"
  278. echo "eucKR EUC-KR"
  279. echo "eucTW EUC-TW"
  280. echo "hp15CN GB2312"
  281. #echo "ccdc ?" # what is this?
  282. echo "SJIS SHIFT_JIS"
  283. echo "utf8 UTF-8"
  284. ;;
  285. irix*)
  286. echo "ISO8859-1 ISO-8859-1"
  287. echo "ISO8859-2 ISO-8859-2"
  288. echo "ISO8859-5 ISO-8859-5"
  289. echo "ISO8859-7 ISO-8859-7"
  290. echo "ISO8859-9 ISO-8859-9"
  291. echo "eucCN GB2312"
  292. echo "eucJP EUC-JP"
  293. echo "eucKR EUC-KR"
  294. echo "eucTW EUC-TW"
  295. ;;
  296. osf*)
  297. echo "ISO8859-1 ISO-8859-1"
  298. echo "ISO8859-2 ISO-8859-2"
  299. echo "ISO8859-4 ISO-8859-4"
  300. echo "ISO8859-5 ISO-8859-5"
  301. echo "ISO8859-7 ISO-8859-7"
  302. echo "ISO8859-8 ISO-8859-8"
  303. echo "ISO8859-9 ISO-8859-9"
  304. echo "ISO8859-15 ISO-8859-15"
  305. echo "cp850 CP850"
  306. echo "big5 BIG5"
  307. echo "dechanyu DEC-HANYU"
  308. echo "dechanzi GB2312"
  309. echo "deckanji DEC-KANJI"
  310. echo "deckorean EUC-KR"
  311. echo "eucJP EUC-JP"
  312. echo "eucKR EUC-KR"
  313. echo "eucTW EUC-TW"
  314. echo "GBK GBK"
  315. echo "KSC5601 CP949"
  316. echo "sdeckanji EUC-JP"
  317. echo "SJIS SHIFT_JIS"
  318. echo "TACTIS TIS-620"
  319. echo "UTF-8 UTF-8"
  320. ;;
  321. solaris*)
  322. echo "646 ASCII"
  323. echo "ISO8859-1 ISO-8859-1"
  324. echo "ISO8859-2 ISO-8859-2"
  325. echo "ISO8859-3 ISO-8859-3"
  326. echo "ISO8859-4 ISO-8859-4"
  327. echo "ISO8859-5 ISO-8859-5"
  328. echo "ISO8859-6 ISO-8859-6"
  329. echo "ISO8859-7 ISO-8859-7"
  330. echo "ISO8859-8 ISO-8859-8"
  331. echo "ISO8859-9 ISO-8859-9"
  332. echo "ISO8859-15 ISO-8859-15"
  333. echo "koi8-r KOI8-R"
  334. echo "ansi-1251 CP1251"
  335. echo "BIG5 BIG5"
  336. echo "Big5-HKSCS BIG5-HKSCS"
  337. echo "gb2312 GB2312"
  338. echo "GBK GBK"
  339. echo "GB18030 GB18030"
  340. echo "cns11643 EUC-TW"
  341. echo "5601 EUC-KR"
  342. echo "ko_KR.johap92 JOHAB"
  343. echo "eucJP EUC-JP"
  344. echo "PCK SHIFT_JIS"
  345. echo "TIS620.2533 TIS-620"
  346. #echo "sun_eu_greek ?" # what is this?
  347. echo "UTF-8 UTF-8"
  348. ;;
  349. freebsd* | os2*)
  350. # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
  351. # localcharset.c falls back to using the full locale name
  352. # from the environment variables.
  353. # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
  354. # reuse FreeBSD's locale data for OS/2.
  355. echo "C ASCII"
  356. echo "US-ASCII ASCII"
  357. for l in la_LN lt_LN; do
  358. echo "$l.ASCII ASCII"
  359. done
  360. for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
  361. fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
  362. lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
  363. echo "$l.ISO_8859-1 ISO-8859-1"
  364. echo "$l.DIS_8859-15 ISO-8859-15"
  365. done
  366. for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
  367. echo "$l.ISO_8859-2 ISO-8859-2"
  368. done
  369. for l in la_LN lt_LT; do
  370. echo "$l.ISO_8859-4 ISO-8859-4"
  371. done
  372. for l in ru_RU ru_SU; do
  373. echo "$l.KOI8-R KOI8-R"
  374. echo "$l.ISO_8859-5 ISO-8859-5"
  375. echo "$l.CP866 CP866"
  376. done
  377. echo "uk_UA.KOI8-U KOI8-U"
  378. echo "zh_TW.BIG5 BIG5"
  379. echo "zh_TW.Big5 BIG5"
  380. echo "zh_CN.EUC GB2312"
  381. echo "ja_JP.EUC EUC-JP"
  382. echo "ja_JP.SJIS SHIFT_JIS"
  383. echo "ja_JP.Shift_JIS SHIFT_JIS"
  384. echo "ko_KR.EUC EUC-KR"
  385. ;;
  386. netbsd*)
  387. echo "646 ASCII"
  388. echo "ISO8859-1 ISO-8859-1"
  389. echo "ISO8859-2 ISO-8859-2"
  390. echo "ISO8859-4 ISO-8859-4"
  391. echo "ISO8859-5 ISO-8859-5"
  392. echo "ISO8859-7 ISO-8859-7"
  393. echo "ISO8859-13 ISO-8859-13"
  394. echo "ISO8859-15 ISO-8859-15"
  395. echo "eucCN GB2312"
  396. echo "eucJP EUC-JP"
  397. echo "eucKR EUC-KR"
  398. echo "eucTW EUC-TW"
  399. echo "BIG5 BIG5"
  400. echo "SJIS SHIFT_JIS"
  401. ;;
  402. openbsd*)
  403. echo "646 ASCII"
  404. echo "ISO8859-1 ISO-8859-1"
  405. echo "ISO8859-2 ISO-8859-2"
  406. echo "ISO8859-4 ISO-8859-4"
  407. echo "ISO8859-5 ISO-8859-5"
  408. echo "ISO8859-7 ISO-8859-7"
  409. echo "ISO8859-13 ISO-8859-13"
  410. echo "ISO8859-15 ISO-8859-15"
  411. ;;
  412. darwin[56]*)
  413. # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
  414. # localcharset.c falls back to using the full locale name
  415. # from the environment variables.
  416. echo "C ASCII"
  417. for l in en_AU en_CA en_GB en_US la_LN; do
  418. echo "$l.US-ASCII ASCII"
  419. done
  420. for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
  421. fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
  422. nl_NL no_NO pt_PT sv_SE; do
  423. echo "$l ISO-8859-1"
  424. echo "$l.ISO8859-1 ISO-8859-1"
  425. echo "$l.ISO8859-15 ISO-8859-15"
  426. done
  427. for l in la_LN; do
  428. echo "$l.ISO8859-1 ISO-8859-1"
  429. echo "$l.ISO8859-15 ISO-8859-15"
  430. done
  431. for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
  432. echo "$l.ISO8859-2 ISO-8859-2"
  433. done
  434. for l in la_LN lt_LT; do
  435. echo "$l.ISO8859-4 ISO-8859-4"
  436. done
  437. for l in ru_RU; do
  438. echo "$l.KOI8-R KOI8-R"
  439. echo "$l.ISO8859-5 ISO-8859-5"
  440. echo "$l.CP866 CP866"
  441. done
  442. for l in bg_BG; do
  443. echo "$l.CP1251 CP1251"
  444. done
  445. echo "uk_UA.KOI8-U KOI8-U"
  446. echo "zh_TW.BIG5 BIG5"
  447. echo "zh_TW.Big5 BIG5"
  448. echo "zh_CN.EUC GB2312"
  449. echo "ja_JP.EUC EUC-JP"
  450. echo "ja_JP.SJIS SHIFT_JIS"
  451. echo "ko_KR.EUC EUC-KR"
  452. ;;
  453. darwin*)
  454. # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
  455. # useless:
  456. # - It returns the empty string when LANG is set to a locale of the
  457. # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
  458. # LC_CTYPE file.
  459. # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
  460. # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
  461. # - The documentation says:
  462. # "... all code that calls BSD system routines should ensure
  463. # that the const *char parameters of these routines are in UTF-8
  464. # encoding. All BSD system functions expect their string
  465. # parameters to be in UTF-8 encoding and nothing else."
  466. # It also says
  467. # "An additional caveat is that string parameters for files,
  468. # paths, and other file-system entities must be in canonical
  469. # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
  470. # characters are decomposed ..."
  471. # but this is not true: You can pass non-decomposed UTF-8 strings
  472. # to file system functions, and it is the OS which will convert
  473. # them to decomposed UTF-8 before accessing the file system.
  474. # - The Apple Terminal application displays UTF-8 by default.
  475. # - However, other applications are free to use different encodings:
  476. # - xterm uses ISO-8859-1 by default.
  477. # - TextEdit uses MacRoman by default.
  478. # We prefer UTF-8 over decomposed UTF-8-MAC because one should
  479. # minimize the use of decomposed Unicode. Unfortunately, through the
  480. # Darwin file system, decomposed UTF-8 strings are leaked into user
  481. # space nevertheless.
  482. # Then there are also the locales with encodings other than US-ASCII
  483. # and UTF-8. These locales can be occasionally useful to users (e.g.
  484. # when grepping through ISO-8859-1 encoded text files), when all their
  485. # file names are in US-ASCII.
  486. echo "ISO8859-1 ISO-8859-1"
  487. echo "ISO8859-2 ISO-8859-2"
  488. echo "ISO8859-4 ISO-8859-4"
  489. echo "ISO8859-5 ISO-8859-5"
  490. echo "ISO8859-7 ISO-8859-7"
  491. echo "ISO8859-9 ISO-8859-9"
  492. echo "ISO8859-13 ISO-8859-13"
  493. echo "ISO8859-15 ISO-8859-15"
  494. echo "KOI8-R KOI8-R"
  495. echo "KOI8-U KOI8-U"
  496. echo "CP866 CP866"
  497. echo "CP949 CP949"
  498. echo "CP1131 CP1131"
  499. echo "CP1251 CP1251"
  500. echo "eucCN GB2312"
  501. echo "GB2312 GB2312"
  502. echo "eucJP EUC-JP"
  503. echo "eucKR EUC-KR"
  504. echo "Big5 BIG5"
  505. echo "Big5HKSCS BIG5-HKSCS"
  506. echo "GBK GBK"
  507. echo "GB18030 GB18030"
  508. echo "SJIS SHIFT_JIS"
  509. echo "ARMSCII-8 ARMSCII-8"
  510. echo "PT154 PT154"
  511. #echo "ISCII-DEV ?"
  512. echo "* UTF-8"
  513. ;;
  514. beos* | haiku*)
  515. # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
  516. echo "* UTF-8"
  517. ;;
  518. msdosdjgpp*)
  519. # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
  520. # localcharset.c falls back to using the full locale name
  521. # from the environment variables.
  522. echo "#"
  523. echo "# The encodings given here may not all be correct."
  524. echo "# If you find that the encoding given for your language and"
  525. echo "# country is not the one your DOS machine actually uses, just"
  526. echo "# correct it in this file, and send a mail to"
  527. echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
  528. echo "# and Bruno Haible <bruno@clisp.org>."
  529. echo "#"
  530. echo "C ASCII"
  531. # ISO-8859-1 languages
  532. echo "ca CP850"
  533. echo "ca_ES CP850"
  534. echo "da CP865" # not CP850 ??
  535. echo "da_DK CP865" # not CP850 ??
  536. echo "de CP850"
  537. echo "de_AT CP850"
  538. echo "de_CH CP850"
  539. echo "de_DE CP850"
  540. echo "en CP850"
  541. echo "en_AU CP850" # not CP437 ??
  542. echo "en_CA CP850"
  543. echo "en_GB CP850"
  544. echo "en_NZ CP437"
  545. echo "en_US CP437"
  546. echo "en_ZA CP850" # not CP437 ??
  547. echo "es CP850"
  548. echo "es_AR CP850"
  549. echo "es_BO CP850"
  550. echo "es_CL CP850"
  551. echo "es_CO CP850"
  552. echo "es_CR CP850"
  553. echo "es_CU CP850"
  554. echo "es_DO CP850"
  555. echo "es_EC CP850"
  556. echo "es_ES CP850"
  557. echo "es_GT CP850"
  558. echo "es_HN CP850"
  559. echo "es_MX CP850"
  560. echo "es_NI CP850"
  561. echo "es_PA CP850"
  562. echo "es_PY CP850"
  563. echo "es_PE CP850"
  564. echo "es_SV CP850"
  565. echo "es_UY CP850"
  566. echo "es_VE CP850"
  567. echo "et CP850"
  568. echo "et_EE CP850"
  569. echo "eu CP850"
  570. echo "eu_ES CP850"
  571. echo "fi CP850"
  572. echo "fi_FI CP850"
  573. echo "fr CP850"
  574. echo "fr_BE CP850"
  575. echo "fr_CA CP850"
  576. echo "fr_CH CP850"
  577. echo "fr_FR CP850"
  578. echo "ga CP850"
  579. echo "ga_IE CP850"
  580. echo "gd CP850"
  581. echo "gd_GB CP850"
  582. echo "gl CP850"
  583. echo "gl_ES CP850"
  584. echo "id CP850" # not CP437 ??
  585. echo "id_ID CP850" # not CP437 ??
  586. echo "is CP861" # not CP850 ??
  587. echo "is_IS CP861" # not CP850 ??
  588. echo "it CP850"
  589. echo "it_CH CP850"
  590. echo "it_IT CP850"
  591. echo "lt CP775"
  592. echo "lt_LT CP775"
  593. echo "lv CP775"
  594. echo "lv_LV CP775"
  595. echo "nb CP865" # not CP850 ??
  596. echo "nb_NO CP865" # not CP850 ??
  597. echo "nl CP850"
  598. echo "nl_BE CP850"
  599. echo "nl_NL CP850"
  600. echo "nn CP865" # not CP850 ??
  601. echo "nn_NO CP865" # not CP850 ??
  602. echo "no CP865" # not CP850 ??
  603. echo "no_NO CP865" # not CP850 ??
  604. echo "pt CP850"
  605. echo "pt_BR CP850"
  606. echo "pt_PT CP850"
  607. echo "sv CP850"
  608. echo "sv_SE CP850"
  609. # ISO-8859-2 languages
  610. echo "cs CP852"
  611. echo "cs_CZ CP852"
  612. echo "hr CP852"
  613. echo "hr_HR CP852"
  614. echo "hu CP852"
  615. echo "hu_HU CP852"
  616. echo "pl CP852"
  617. echo "pl_PL CP852"
  618. echo "ro CP852"
  619. echo "ro_RO CP852"
  620. echo "sk CP852"
  621. echo "sk_SK CP852"
  622. echo "sl CP852"
  623. echo "sl_SI CP852"
  624. echo "sq CP852"
  625. echo "sq_AL CP852"
  626. echo "sr CP852" # CP852 or CP866 or CP855 ??
  627. echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
  628. echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
  629. # ISO-8859-3 languages
  630. echo "mt CP850"
  631. echo "mt_MT CP850"
  632. # ISO-8859-5 languages
  633. echo "be CP866"
  634. echo "be_BE CP866"
  635. echo "bg CP866" # not CP855 ??
  636. echo "bg_BG CP866" # not CP855 ??
  637. echo "mk CP866" # not CP855 ??
  638. echo "mk_MK CP866" # not CP855 ??
  639. echo "ru CP866"
  640. echo "ru_RU CP866"
  641. echo "uk CP1125"
  642. echo "uk_UA CP1125"
  643. # ISO-8859-6 languages
  644. echo "ar CP864"
  645. echo "ar_AE CP864"
  646. echo "ar_DZ CP864"
  647. echo "ar_EG CP864"
  648. echo "ar_IQ CP864"
  649. echo "ar_IR CP864"
  650. echo "ar_JO CP864"
  651. echo "ar_KW CP864"
  652. echo "ar_MA CP864"
  653. echo "ar_OM CP864"
  654. echo "ar_QA CP864"
  655. echo "ar_SA CP864"
  656. echo "ar_SY CP864"
  657. # ISO-8859-7 languages
  658. echo "el CP869"
  659. echo "el_GR CP869"
  660. # ISO-8859-8 languages
  661. echo "he CP862"
  662. echo "he_IL CP862"
  663. # ISO-8859-9 languages
  664. echo "tr CP857"
  665. echo "tr_TR CP857"
  666. # Japanese
  667. echo "ja CP932"
  668. echo "ja_JP CP932"
  669. # Chinese
  670. echo "zh_CN GBK"
  671. echo "zh_TW CP950" # not CP938 ??
  672. # Korean
  673. echo "kr CP949" # not CP934 ??
  674. echo "kr_KR CP949" # not CP934 ??
  675. # Thai
  676. echo "th CP874"
  677. echo "th_TH CP874"
  678. # Other
  679. echo "eo CP850"
  680. echo "eo_EO CP850"
  681. ;;
  682. esac