1 cat <<EOF | gperf -Ncharset_canonicalize_aux -m16 -l -E -t -C -F", NULL"
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * Copyright © 2006 Pierre Habouzit
23 * The following list has been created manually from the data under:
24 * http://www.isi.edu/in-notes/iana/assignments/character-sets
25 * Last update: 2000-09-07
27 * Note that it includes only the subset of character sets for which
28 * a preferred MIME name is given.
30 * the corespondance tries to resume from any brain dead way to write the
31 * encoding name, hence you have to pass a charset stripped from its '-' and
32 * '_' and truncated at the first ':' encountered.
35 static const struct cset_pair *
36 charset_canonicalize_aux(const char *str, unsigned int len);
38 struct cset_pair { const char *name; const char *pref; };
40 ansix3.41968, "us-ascii"
49 cseucpkdfmtjapanese, "euc-jp"
51 csiso2022jp2, "iso-2022-jp-2"
52 csiso2022jp, "iso-2022-jp"
53 csiso2022kr, "iso-2022-kr"
54 csisolatin1, "iso-8859-1"
55 csisolatin2, "iso-8859-2"
56 csisolatin3, "iso-8859-3"
57 csisolatin4, "iso-8859-4"
58 csisolatin5, "iso-8859-9"
59 csisolatin6, "iso-8859-10"
60 csisolatinarabic, "iso-8859-6"
61 csisolatincyrillic, "iso8859-5"
62 csisolatingreek, "iso-8859-7"
63 csisolatinhebrew, "iso-8859-8"
65 csshiftjis, "shift_jis"
66 cyrillic, "iso-8859-5"
72 extendedunixcodepackedformatforjapanese, "euc-jp"
78 iso646.irv, "us-ascii"
80 iso885910, "iso-8859-10"
81 iso885913, "iso-8859-13"
82 iso885914, "iso-8859-14"
83 iso885915, "iso-8859-15"
84 iso885916, "iso-8859-16"
85 iso88591, "iso-8859-1"
86 iso88592, "iso-8859-2"
87 iso88593, "iso-8859-3"
88 iso88594, "iso-8859-4"
89 iso88595, "iso-8859-5"
90 iso88596, "iso-8859-6"
91 iso88597, "iso-8859-7"
92 iso88598, "iso-8859-8"
93 iso88599, "iso-8859-9"
94 isoir100, "iso-8859-1"
95 isoir101, "iso-8859-2"
96 isoir109, "iso-8859-3"
97 isoir110, "iso-8859-4"
98 isoir126, "iso-8859-7"
99 isoir127, "iso-8859-6"
100 isoir138, "iso-8859-8"
101 isoir144, "iso-8859-5"
102 isoir148, "iso-8859-9"
103 isoir157, "iso-8859-10"
104 isoir179, "iso-8859-13"
115 latin0, "iso-8859-15"
121 latin6, "iso-8859-10"
122 latin7, "iso-8859-13"
123 latin8, "iso-8859-14"
124 latin9, "iso-8859-15"
125 latin10, "iso-8859-16"