Update.
[glibc.git] / iconvdata / tst-tables.sh
bloba2b445a3869502f0dfd0a3d626d13f0314b608a9
1 #!/bin/sh
2 # Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
4 # Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
7 # The GNU C Library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # The GNU C Library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # 02111-1307 USA.
22 # Checks that the iconv() implementation (in both directions) for the
23 # stateless encodings agrees with the corresponding charmap table.
25 common_objpfx=$1
26 objpfx=$2
28 status=0
30 cat <<EOF |
31 # Single-byte and other "small" encodings come here.
32 # Keep this list in the same order as gconv-modules.
34 # charset name table name comment
35 ASCII ANSI_X3.4-1968
36 ISO646-GB BS_4730
37 ISO646-CA CSA_Z243.4-1985-1
38 ISO646-CA2 CSA_Z243.4-1985-2
39 ISO646-DE DIN_66003
40 ISO646-DK DS_2089
41 ISO646-ES ES
42 ISO646-ES2 ES2
43 ISO646-CN GB_1988-80
44 ISO646-IT IT
45 ISO646-JP JIS_C6220-1969-RO
46 ISO646-JP-OCR-B JIS_C6229-1984-B
47 ISO646-YU JUS_I.B1.002
48 ISO646-KR KSC5636
49 ISO646-HU MSZ_7795.3
50 ISO646-CU NC_NC00-10
51 ISO646-FR NF_Z_62-010
52 ISO646-FR1 NF_Z_62-010_1973
53 ISO646-NO NS_4551-1
54 ISO646-NO2 NS_4551-2
55 ISO646-PT PT
56 ISO646-PT2 PT2
57 ISO646-SE SEN_850200_B
58 ISO646-SE2 SEN_850200_C
59 ISO-8859-1
60 ISO-8859-2
61 ISO-8859-3
62 ISO-8859-4
63 ISO-8859-5
64 ISO-8859-6
65 ISO-8859-7
66 ISO-8859-8
67 ISO-8859-9
68 ISO-8859-10
69 #ISO-8859-11 No corresponding table, nonstandard
70 ISO-8859-13
71 ISO-8859-14
72 ISO-8859-15
73 ISO-8859-16
74 T.61-8BIT
75 ISO_6937
76 #ISO_6937-2 ISO-IR-90 Handling of combining marks is broken
77 KOI-8
78 KOI8-R
79 LATIN-GREEK
80 LATIN-GREEK-1
81 HP-ROMAN8
82 EBCDIC-AT-DE
83 EBCDIC-AT-DE-A
84 EBCDIC-CA-FR
85 EBCDIC-DK-NO
86 EBCDIC-DK-NO-A
87 EBCDIC-ES
88 EBCDIC-ES-A
89 EBCDIC-ES-S
90 EBCDIC-FI-SE
91 EBCDIC-FI-SE-A
92 EBCDIC-FR
93 EBCDIC-IS-FRISS
94 EBCDIC-IT
95 EBCDIC-PT
96 EBCDIC-UK
97 EBCDIC-US
98 IBM037
99 IBM038
100 IBM256
101 IBM273
102 IBM274
103 IBM275
104 IBM277
105 IBM278
106 IBM280
107 IBM281
108 IBM284
109 IBM285
110 IBM290
111 IBM297
112 IBM420
113 IBM423
114 IBM424
115 IBM437
116 IBM500
117 IBM850
118 IBM851
119 IBM852
120 IBM855
121 IBM856
122 IBM857
123 IBM860
124 IBM861
125 IBM862
126 IBM863
127 IBM864
128 IBM865
129 IBM866
130 IBM868
131 IBM869
132 IBM870
133 IBM871
134 IBM875
135 IBM880
136 IBM891
137 IBM903
138 IBM904
139 IBM905
140 IBM918
141 IBM922
142 IBM1004
143 IBM1026
144 #IBM1046 Differs from the AIX and JDK converters
145 IBM1047
146 IBM1124
147 IBM1129
148 IBM1160
149 IBM1161
150 IBM1132
151 IBM1133
152 IBM1162
153 IBM1163
154 IBM1164
155 CP1250
156 CP1251
157 CP1252
158 CP1253
159 CP1254
160 CP1255
161 CP1256
162 CP1257
163 CP1258
164 IBM874
165 CP737
166 CP775
167 MACINTOSH
168 IEC_P27-1
169 ASMO_449
170 ISO-IR-99 ANSI_X3.110-1983
171 ISO-IR-139 CSN_369103
173 DEC-MCS
174 ECMA-CYRILLIC
175 ISO-IR-153 GOST_19768-74
176 GREEK-CCITT
177 GREEK7
178 GREEK7-OLD
179 INIS
180 INIS-8
181 INIS-CYRILLIC
182 ISO_2033 ISO_2033-1983
183 ISO_5427
184 ISO_5427-EXT
185 #ISO_5428 Handling of combining marks is broken
186 ISO_10367-BOX
187 MAC-IS
188 MAC-UK
189 CP10007
190 NATS-DANO
191 NATS-SEFI
192 WIN-SAMI-2 SAMI-WS2
193 ISO-IR-197
194 TIS-620
195 KOI8-U
196 #ISIRI-3342 This charset concept is completely broken
197 VISCII
198 KOI8-T
199 GEORGIAN-PS
200 GEORGIAN-ACADEMY
201 ISO-IR-209
202 MAC-SAMI
203 ARMSCII-8
204 TCVN5712-1
206 # Multibyte encodings come here
208 SJIS SHIFT_JIS
209 #IBM932 This converter looks quite strange
210 #IBM943 This converter looks quite strange
211 EUC-KR
212 CP949
213 JOHAB
214 BIG5
215 BIG5HKSCS BIG5-HKSCS
216 EUC-JP
217 EUC-CN GB2312
219 EUC-TW
220 GB18030
221 EUC-JISX0213
222 SHIFT_JISX0213
224 # Stateful encodings not testable this way
226 #IBM930
227 #IBM933
228 #IBM935
229 #IBM937
230 #IBM939
231 #ISO-2022-JP
232 #ISO-2022-JP-2
233 #ISO-2022-JP-3
234 #ISO-2022-KR
235 #ISO-2022-CN
236 #ISO-2022-CN-EXT
237 #UTF-7
240 while read charset charmap; do
241 if test "$charset" = GB18030; then echo "This might take a while" 1>&2; fi
242 case ${charset} in \#*) continue;; esac
243 echo -n "Testing ${charset}" 1>&2
244 if ${SHELL} tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}; then
245 echo 1>&2
246 else
247 echo "failed: ./tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}"
248 echo " *** FAILED ***" 1>&2
249 exit 1
251 done
253 exit $?