2 # Output a system dependent table of character encoding aliases.
4 # Copyright (C) 2000-2004 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
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 General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # The table consists of lines of the form
23 # ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
24 # ALIAS is compared in a case sensitive way.
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.
32 # name MIME? used by which systems
33 # ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
34 # ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
35 # ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
36 # ISO-8859-3 Y glibc solaris
37 # ISO-8859-4 Y osf solaris freebsd darwin
38 # ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
39 # ISO-8859-6 Y glibc aix hpux solaris
40 # ISO-8859-7 Y glibc aix hpux irix osf solaris
41 # ISO-8859-8 Y glibc aix hpux osf solaris
42 # ISO-8859-9 Y glibc aix hpux irix osf solaris
45 # ISO-8859-15 glibc aix osf solaris freebsd
46 # KOI8-R Y glibc solaris freebsd darwin
47 # KOI8-U Y glibc freebsd darwin
60 # CP866 freebsd darwin dos
73 # CP1251 glibc solaris darwin woe32
80 # GB2312 Y glibc aix hpux irix solaris freebsd darwin
81 # EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
82 # EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
83 # EUC-TW glibc aix hpux irix osf solaris
84 # BIG5 Y glibc aix hpux osf solaris freebsd darwin
85 # BIG5-HKSCS glibc solaris
86 # GBK glibc aix osf solaris woe32 dos
87 # GB18030 glibc solaris
88 # SHIFT_JIS Y hpux osf solaris freebsd darwin
89 # JOHAB glibc solaris woe32
90 # TIS-620 glibc aix hpux osf solaris
102 # UTF-8 Y glibc aix hpux osf solaris
104 # Note: Names which are not marked as being a MIME name should not be used in
105 # Internet protocols for information interchange (mail, news, etc.).
107 # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
108 # must understand both names and treat them as equivalent.
110 # The first argument passed to this file is the canonical host specification,
111 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
113 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
116 os
=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
117 echo "# This file contains a table of character encoding aliases,"
118 echo "# suitable for operating system '${os}'."
119 echo "# It was automatically generated from config.charset."
120 # List of references, updated during installation:
121 echo "# Packages using this file: "
124 # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
125 # localcharset.c falls back to using the full locale name
126 # from the environment variables.
129 for l
in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
130 en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
131 en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
132 es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
133 et_EE eu eu_ES
fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
134 fr_LU ga ga_IE gl gl_ES id id_ID
in in_ID is is_IS it it_CH \
135 it_IT kl kl_GL
nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
138 echo "$l.iso-8859-1 ISO-8859-1"
139 echo "$l.iso-8859-15 ISO-8859-15"
140 echo "$l.iso-8859-15@euro ISO-8859-15"
141 echo "$l@euro ISO-8859-15"
142 echo "$l.cp-437 CP437"
143 echo "$l.cp-850 CP850"
144 echo "$l.cp-1252 CP1252"
145 echo "$l.cp-1252@euro CP1252"
146 #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
147 echo "$l.utf-8 UTF-8"
148 echo "$l.utf-8@euro UTF-8"
150 for l
in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
151 sl_SI sr sr_CS sr_YU
; do
153 echo "$l.iso-8859-2 ISO-8859-2"
154 echo "$l.cp-852 CP852"
155 echo "$l.cp-1250 CP1250"
156 echo "$l.utf-8 UTF-8"
158 for l
in mk mk_MK ru ru_RU
; do
160 echo "$l.iso-8859-5 ISO-8859-5"
161 echo "$l.koi8-r KOI8-R"
162 echo "$l.cp-866 CP866"
163 echo "$l.cp-1251 CP1251"
164 echo "$l.utf-8 UTF-8"
166 for l
in ar ar_SA
; do
168 echo "$l.iso-8859-6 ISO-8859-6"
169 echo "$l.cp-864 CP864"
170 #echo "$l.cp-868 CP868" # not a commonly used encoding
171 echo "$l.cp-1256 CP1256"
172 echo "$l.utf-8 UTF-8"
174 for l
in el el_GR gr gr_GR
; do
176 echo "$l.iso-8859-7 ISO-8859-7"
177 echo "$l.cp-869 CP869"
178 echo "$l.cp-1253 CP1253"
179 echo "$l.cp-1253@euro CP1253"
180 echo "$l.utf-8 UTF-8"
181 echo "$l.utf-8@euro UTF-8"
183 for l
in he he_IL iw iw_IL
; do
185 echo "$l.iso-8859-8 ISO-8859-8"
186 echo "$l.cp-862 CP862"
187 echo "$l.cp-1255 CP1255"
188 echo "$l.utf-8 UTF-8"
190 for l
in tr tr_TR
; do
192 echo "$l.iso-8859-9 ISO-8859-9"
193 echo "$l.cp-857 CP857"
194 echo "$l.cp-1254 CP1254"
195 echo "$l.utf-8 UTF-8"
197 for l
in lt lt_LT lv lv_LV
; do
198 #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
199 echo "$l ISO-8859-13"
201 for l
in ru_UA uk uk_UA
; do
204 for l
in zh zh_CN
; do
205 #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
208 for l
in ja ja_JP ja_JP.EUC
; do
211 for l
in ko ko_KR
; do
214 for l
in th th_TH
; do
217 for l
in fa fa_IR
; do
218 #echo "$l ISIRI-3342" # a broken encoding
219 echo "$l.utf-8 UTF-8"
223 # With glibc-2.1 or newer, we don't need any canonicalization,
224 # because glibc has iconv and both glibc and libiconv support all
225 # GNU canonical names directly. Therefore, the Makefile does not
226 # need to install the alias file at all.
227 # The following applies only to glibc-2.0.x and older libcs.
228 echo "ISO_646.IRV:1983 ASCII"
231 echo "ISO8859-1 ISO-8859-1"
232 echo "ISO8859-2 ISO-8859-2"
233 echo "ISO8859-5 ISO-8859-5"
234 echo "ISO8859-6 ISO-8859-6"
235 echo "ISO8859-7 ISO-8859-7"
236 echo "ISO8859-8 ISO-8859-8"
237 echo "ISO8859-9 ISO-8859-9"
238 echo "ISO8859-15 ISO-8859-15"
241 echo "IBM-921 ISO-8859-13"
245 echo "IBM-1046 CP1046"
246 echo "IBM-1124 CP1124"
247 echo "IBM-1129 CP1129"
248 echo "IBM-1252 CP1252"
249 echo "IBM-eucCN GB2312"
250 echo "IBM-eucJP EUC-JP"
251 echo "IBM-eucKR EUC-KR"
252 echo "IBM-eucTW EUC-TW"
255 echo "TIS-620 TIS-620"
259 echo "iso88591 ISO-8859-1"
260 echo "iso88592 ISO-8859-2"
261 echo "iso88595 ISO-8859-5"
262 echo "iso88596 ISO-8859-6"
263 echo "iso88597 ISO-8859-7"
264 echo "iso88598 ISO-8859-8"
265 echo "iso88599 ISO-8859-9"
266 echo "iso885915 ISO-8859-15"
267 echo "roman8 HP-ROMAN8"
268 echo "arabic8 HP-ARABIC8"
269 echo "greek8 HP-GREEK8"
270 echo "hebrew8 HP-HEBREW8"
271 echo "turkish8 HP-TURKISH8"
272 echo "kana8 HP-KANA8"
273 echo "tis620 TIS-620"
279 #echo "ccdc ?" # what is this?
280 echo "SJIS SHIFT_JIS"
284 echo "ISO8859-1 ISO-8859-1"
285 echo "ISO8859-2 ISO-8859-2"
286 echo "ISO8859-5 ISO-8859-5"
287 echo "ISO8859-7 ISO-8859-7"
288 echo "ISO8859-9 ISO-8859-9"
295 echo "ISO8859-1 ISO-8859-1"
296 echo "ISO8859-2 ISO-8859-2"
297 echo "ISO8859-4 ISO-8859-4"
298 echo "ISO8859-5 ISO-8859-5"
299 echo "ISO8859-7 ISO-8859-7"
300 echo "ISO8859-8 ISO-8859-8"
301 echo "ISO8859-9 ISO-8859-9"
302 echo "ISO8859-15 ISO-8859-15"
305 echo "dechanyu DEC-HANYU"
306 echo "dechanzi GB2312"
307 echo "deckanji DEC-KANJI"
308 echo "deckorean EUC-KR"
314 echo "sdeckanji EUC-JP"
315 echo "SJIS SHIFT_JIS"
316 echo "TACTIS TIS-620"
321 echo "ISO8859-1 ISO-8859-1"
322 echo "ISO8859-2 ISO-8859-2"
323 echo "ISO8859-3 ISO-8859-3"
324 echo "ISO8859-4 ISO-8859-4"
325 echo "ISO8859-5 ISO-8859-5"
326 echo "ISO8859-6 ISO-8859-6"
327 echo "ISO8859-7 ISO-8859-7"
328 echo "ISO8859-8 ISO-8859-8"
329 echo "ISO8859-9 ISO-8859-9"
330 echo "ISO8859-15 ISO-8859-15"
332 echo "ansi-1251 CP1251"
334 echo "Big5-HKSCS BIG5-HKSCS"
337 echo "GB18030 GB18030"
338 echo "cns11643 EUC-TW"
340 echo "ko_KR.johap92 JOHAB"
343 echo "TIS620.2533 TIS-620"
344 #echo "sun_eu_greek ?" # what is this?
348 # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
349 # localcharset.c falls back to using the full locale name
350 # from the environment variables.
351 # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
352 # reuse FreeBSD's locale data for OS/2.
354 echo "US-ASCII ASCII"
355 for l
in la_LN lt_LN
; do
356 echo "$l.ASCII ASCII"
358 for l
in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
359 fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
360 lt_LN nl_BE nl_NL no_NO pt_PT sv_SE
; do
361 echo "$l.ISO_8859-1 ISO-8859-1"
362 echo "$l.DIS_8859-15 ISO-8859-15"
364 for l
in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI
; do
365 echo "$l.ISO_8859-2 ISO-8859-2"
367 for l
in la_LN lt_LT
; do
368 echo "$l.ISO_8859-4 ISO-8859-4"
370 for l
in ru_RU ru_SU
; do
371 echo "$l.KOI8-R KOI8-R"
372 echo "$l.ISO_8859-5 ISO-8859-5"
373 echo "$l.CP866 CP866"
375 echo "uk_UA.KOI8-U KOI8-U"
376 echo "zh_TW.BIG5 BIG5"
377 echo "zh_TW.Big5 BIG5"
378 echo "zh_CN.EUC GB2312"
379 echo "ja_JP.EUC EUC-JP"
380 echo "ja_JP.SJIS SHIFT_JIS"
381 echo "ja_JP.Shift_JIS SHIFT_JIS"
382 echo "ko_KR.EUC EUC-KR"
386 echo "ISO8859-1 ISO-8859-1"
387 echo "ISO8859-2 ISO-8859-2"
388 echo "ISO8859-4 ISO-8859-4"
389 echo "ISO8859-5 ISO-8859-5"
390 echo "ISO8859-15 ISO-8859-15"
396 echo "SJIS SHIFT_JIS"
399 # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
400 # localcharset.c falls back to using the full locale name
401 # from the environment variables.
403 for l
in en_AU en_CA en_GB en_US la_LN
; do
404 echo "$l.US-ASCII ASCII"
406 for l
in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
407 fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
408 nl_NL no_NO pt_PT sv_SE
; do
410 echo "$l.ISO8859-1 ISO-8859-1"
411 echo "$l.ISO8859-15 ISO-8859-15"
414 echo "$l.ISO8859-1 ISO-8859-1"
415 echo "$l.ISO8859-15 ISO-8859-15"
417 for l
in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI
; do
418 echo "$l.ISO8859-2 ISO-8859-2"
420 for l
in la_LN lt_LT
; do
421 echo "$l.ISO8859-4 ISO-8859-4"
424 echo "$l.KOI8-R KOI8-R"
425 echo "$l.ISO8859-5 ISO-8859-5"
426 echo "$l.CP866 CP866"
429 echo "$l.CP1251 CP1251"
431 echo "uk_UA.KOI8-U KOI8-U"
432 echo "zh_TW.BIG5 BIG5"
433 echo "zh_TW.Big5 BIG5"
434 echo "zh_CN.EUC GB2312"
435 echo "ja_JP.EUC EUC-JP"
436 echo "ja_JP.SJIS SHIFT_JIS"
437 echo "ko_KR.EUC EUC-KR"
440 # BeOS has a single locale, and it has UTF-8 encoding.
444 # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
445 # localcharset.c falls back to using the full locale name
446 # from the environment variables.
448 echo "# The encodings given here may not all be correct."
449 echo "# If you find that the encoding given for your language and"
450 echo "# country is not the one your DOS machine actually uses, just"
451 echo "# correct it in this file, and send a mail to"
452 echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
453 echo "# and Bruno Haible <bruno@clisp.org>."
456 # ISO-8859-1 languages
459 echo "da CP865" # not CP850 ??
460 echo "da_DK CP865" # not CP850 ??
466 echo "en_AU CP850" # not CP437 ??
471 echo "en_ZA CP850" # not CP437 ??
509 echo "id CP850" # not CP437 ??
510 echo "id_ID CP850" # not CP437 ??
511 echo "is CP861" # not CP850 ??
512 echo "is_IS CP861" # not CP850 ??
520 echo "nb CP865" # not CP850 ??
521 echo "nb_NO CP865" # not CP850 ??
525 echo "nn CP865" # not CP850 ??
526 echo "nn_NO CP865" # not CP850 ??
527 echo "no CP865" # not CP850 ??
528 echo "no_NO CP865" # not CP850 ??
534 # ISO-8859-2 languages
551 echo "sr CP852" # CP852 or CP866 or CP855 ??
552 echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
553 echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
554 # ISO-8859-3 languages
557 # ISO-8859-5 languages
560 echo "bg CP866" # not CP855 ??
561 echo "bg_BG CP866" # not CP855 ??
562 echo "mk CP866" # not CP855 ??
563 echo "mk_MK CP866" # not CP855 ??
568 # ISO-8859-6 languages
582 # ISO-8859-7 languages
585 # ISO-8859-8 languages
588 # ISO-8859-9 languages
596 echo "zh_TW CP950" # not CP938 ??
598 echo "kr CP949" # not CP934 ??
599 echo "kr_KR CP949" # not CP934 ??