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