Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
[gnulib.git] / lib / config.charset
1 #! /bin/sh
2 # Output a system dependent table of character encoding aliases.
3 #
4 #   Copyright (C) 2000 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 solaris freebsd       yes
37 #   ISO-8859-3                glibc                                     yes
38 #   ISO-8859-4                solaris                                   yes
39 #   ISO-8859-5                glibc aix hpux irix solaris               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 solaris                    yes
43 #   ISO-8859-9                glibc aix hpux irix osf solaris           yes
44 #   ISO-8859-13               glibc
45 #   ISO-8859-15               glibc aix solaris freebsd
46 #   KOI8-R                    glibc solaris freebsd                     yes
47 #   KOI8-U                    glibc                                     yes
48 #   CP850                     aix osf
49 #   CP856                     aix
50 #   CP866                     freebsd
51 #   CP874                     win32
52 #   CP922                     aix
53 #   CP932                     aix win32
54 #   CP943                     aix
55 #   CP949                     win32
56 #   CP950                     win32
57 #   CP1046                    aix
58 #   CP1124                    aix
59 #   CP1129                    aix
60 #   CP1250                    win32
61 #   CP1251                    glibc win32
62 #   CP1252                    aix win32
63 #   CP1253                    win32
64 #   CP1254                    win32
65 #   CP1255                    win32
66 #   CP1256                    win32
67 #   CP1257                    win32
68 #   GB2312                    glibc aix hpux irix solaris               yes
69 #   EUC-JP                    glibc aix hpux irix solaris               yes
70 #   EUC-KR                    glibc aix hpux irix solaris               yes
71 #   EUC-TW                    glibc aix hpux irix solaris
72 #   BIG5                      glibc aix hpux solaris                    yes
73 #   BIG5HKSCS                 glibc
74 #   GBK                       aix win32
75 #   GB18030                   glibc
76 #   SJIS                      hpux solaris
77 #   JOHAB                     glibc win32
78 #   TIS-620                   glibc aix hpux solaris
79 #   VISCII                    glibc                                     yes
80 #   HP-ROMAN8                 hpux
81 #   HP-ARABIC8                hpux
82 #   HP-GREEK8                 hpux
83 #   HP-HEBREW8                hpux
84 #   HP-TURKISH8               hpux
85 #   HP-KANA8                  hpux
86 #   UTF-8                     glibc aix hpux solaris                    yes
87 #
88 # Note: Names which are not marked as being a MIME name should not be used in
89 # Internet protocols for information interchange (mail, news, etc.).
90 #
91 # Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
92 # must understand both names and treat them as equivalent.
93 #
94 # The first argument passed to this file is the canonical host specification,
95 #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
96 # or
97 #    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
98
99 host="$1"
100 os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
101 echo "# This file contains a table of character encoding aliases,"
102 echo "# suitable for operating system '${os}'."
103 echo "# It was automatically generated from config.charset."
104 # List of references, updated during installation:
105 echo "# Packages using this file: "
106 case "$os" in
107     linux* | *-gnu*)
108         # With glibc-2.1 or newer, we don't need any canonicalization,
109         # because glibc has iconv and both glibc and libiconv support all
110         # GNU canonical names directly. Therefore, the Makefile does not
111         # need to install the alias file at all.
112         # The following applies only to glibc-2.0.x and older libcs.
113         echo "ISO_646.IRV:1983 ASCII"
114         ;;
115     aix*)
116         echo "ISO8859-1 ISO-8859-1"
117         echo "ISO8859-2 ISO-8859-2"
118         echo "ISO8859-5 ISO-8859-5"
119         echo "ISO8859-6 ISO-8859-6"
120         echo "ISO8859-7 ISO-8859-7"
121         echo "ISO8859-8 ISO-8859-8"
122         echo "ISO8859-9 ISO-8859-9"
123         echo "ISO8859-15 ISO-8859-15"
124         echo "IBM-850 CP850"
125         echo "IBM-856 CP856"
126         echo "IBM-921 ISO-8859-13"
127         echo "IBM-922 CP922"
128         echo "IBM-932 CP932"
129         echo "IBM-943 CP943"
130         echo "IBM-1046 CP1046"
131         echo "IBM-1124 CP1124"
132         echo "IBM-1129 CP1129"
133         echo "IBM-1252 CP1252"
134         echo "IBM-eucCN GB2312"
135         echo "IBM-eucJP EUC-JP"
136         echo "IBM-eucKR EUC-KR"
137         echo "IBM-eucTW EUC-TW"
138         echo "big5 BIG5"
139         echo "GBK GBK"
140         echo "TIS-620 TIS-620"
141         echo "UTF-8 UTF-8"
142         ;;
143     hpux*)
144         echo "iso88591 ISO-8859-1"
145         echo "iso88592 ISO-8859-2"
146         echo "iso88595 ISO-8859-5"
147         echo "iso88596 ISO-8859-6"
148         echo "iso88597 ISO-8859-7"
149         echo "iso88598 ISO-8859-8"
150         echo "iso88599 ISO-8859-9"
151         echo "iso885915 ISO-8859-15"
152         echo "roman8 HP-ROMAN8"
153         echo "arabic8 HP-ARABIC8"
154         echo "greek8 HP-GREEK8"
155         echo "hebrew8 HP-HEBREW8"
156         echo "turkish8 HP-TURKISH8"
157         echo "kana8 HP-KANA8"
158         echo "tis620 TIS-620"
159         echo "big5 BIG5"
160         echo "eucJP EUC-JP"
161         echo "eucKR EUC-KR"
162         echo "eucTW EUC-TW"
163         echo "hp15CN GB2312"
164         #echo "ccdc ?" # what is this?
165         echo "SJIS SJIS"
166         echo "utf8 UTF-8"
167         ;;
168     irix*)
169         echo "ISO8859-1 ISO-8859-1"
170         echo "ISO8859-2 ISO-8859-2"
171         echo "ISO8859-5 ISO-8859-5"
172         echo "ISO8859-7 ISO-8859-7"
173         echo "ISO8859-9 ISO-8859-9"
174         echo "eucCN GB2312"
175         echo "eucJP EUC-JP"
176         echo "eucKR EUC-KR"
177         echo "eucTW EUC-TW"
178         ;;
179     osf*)
180         echo "ISO8859-1 ISO-8859-1"
181         echo "ISO8859-7 ISO-8859-7"
182         echo "ISO8859-9 ISO-8859-9"
183         echo "cp850 CP850"
184         ;;
185     solaris*)
186         echo "646 ASCII"
187         echo "ISO8859-1 ISO-8859-1"
188         echo "ISO8859-2 ISO-8859-2"
189         echo "ISO8859-4 ISO-8859-4"
190         echo "ISO8859-5 ISO-8859-5"
191         echo "ISO8859-6 ISO-8859-6"
192         echo "ISO8859-7 ISO-8859-7"
193         echo "ISO8859-8 ISO-8859-8"
194         echo "ISO8859-9 ISO-8859-9"
195         echo "ISO8859-15 ISO-8859-15"
196         echo "koi8-r KOI8-R"
197         echo "BIG5 BIG5"
198         echo "gb2312 GB2312"
199         echo "cns11643 EUC-TW"
200         echo "5601 EUC-KR"
201         echo "eucJP EUC-JP"
202         echo "PCK SJIS"
203         echo "TIS620.2533 TIS-620"
204         #echo "sun_eu_greek ?" # what is this?
205         echo "UTF-8 UTF-8"
206         ;;
207     freebsd*)
208         # FreeBSD 3.3 doesn't have nl_langinfo(CODESET); therefore
209         # localcharset.c falls back to using the full locale name
210         # from the environment variables.
211         echo "C ASCII"
212         echo "US-ASCII ASCII"
213         for l in lt_LN; do
214           echo "$l.ASCII ASCII"
215         done
216         for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
217                  fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT lt_LN \
218                  nl_BE nl_NL no_NO pt_PT sv_SE; do
219           echo "$l.ISO_8859-1 ISO-8859-1"
220           echo "$l.DIS_8859-15 ISO-8859-15"
221         done
222         for l in hr_HR hu_HU lt_LN pl_PL sl_SI; do
223           echo "$l.ISO_8859-2 ISO-8859-2"
224         done
225         for l in ru_RU ru_SU; do
226           echo "$l.KOI8-R KOI8-R"
227           echo "$l.CP866 CP866"
228         done
229         ;;
230 esac