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