1/* Copyright (C) 1999-2006 Free Software Foundation, Inc. 2 This file is part of the GNU LIBICONV Library. 3 4 The GNU LIBICONV Library is free software; you can redistribute it 5 and/or modify it under the terms of the GNU Library General Public 6 License as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 The GNU LIBICONV Library is distributed in the hope that it will be 10 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Library General Public License for more details. 13 14 You should have received a copy of the GNU Library General Public 15 License along with the GNU LIBICONV Library; see the file COPYING.LIB. 16 If not, write to the Free Software Foundation, Inc., 51 Franklin Street, 17 Fifth Floor, Boston, MA 02110-1301, USA. */ 18 19/* The list of all system independent user-visible encodings. */ 20 21/* By convention, an encoding named FOOBAR or FOO_BAR or FOO-BAR is defined 22 in a file named "foobar.h" through the functions foobar_mbtowc and 23 foobar_wctomb (and possibly foobar_reset). */ 24 25/* DEFENCODING(( name, alias1, ..., ), 26 xxx, 27 { xxx_mbtowc, xxx_flushwc }, 28 { xxx_wctomb, xxx_reset }) 29 defines an encoding with the given name and aliases. (There is no 30 difference between a name and an alias. By convention, the name is chosen 31 as the preferred MIME name or the standard name.) 32 All names and aliases must be in ASCII. Case is not significant, but 33 for the "cs*" aliases mixed case is preferred, otherwise UPPERCASE is 34 preferred. For all names and aliases, note where it comes from. 35 xxx is the name as used in the C code (lowercase). 36 */ 37 38 39DEFENCODING(( "US-ASCII", /* IANA */ 40 "ASCII", /* IANA, JDK 1.1 */ 41 "ISO646-US", /* IANA */ 42 "ISO_646.IRV:1991", /* IANA */ 43 "ISO-IR-6", /* IANA */ 44 "ANSI_X3.4-1968", /* IANA */ 45 "ANSI_X3.4-1986", /* IANA */ 46 "CP367", /* IANA */ 47 "IBM367", /* IANA */ 48 "US", /* IANA */ 49 "csASCII", /* IANA */ 50 /*"ISO646.1991-IRV", X11R6.4 */ 51 ), 52 ascii, 53 { ascii_mbtowc, NULL }, { ascii_wctomb, NULL }) 54 55/* General multi-byte encodings */ 56 57DEFENCODING(( "UTF-8", /* IANA, RFC 2279 */ 58 /*"UTF8", JDK 1.1 */ 59 /*"CP65001", Windows */ 60 ), 61 utf8, 62 { utf8_mbtowc, NULL }, { utf8_wctomb, NULL }) 63 64DEFENCODING(( "UCS-2", /* glibc */ 65 "ISO-10646-UCS-2", /* IANA */ 66 "csUnicode", /* IANA */ 67 ), 68 ucs2, 69 { ucs2_mbtowc, NULL }, { ucs2_wctomb, NULL }) 70 71DEFENCODING(( "UCS-2BE", /* glibc */ 72 "UNICODEBIG", /* glibc */ 73 "UNICODE-1-1", /* IANA */ 74 "csUnicode11", /* IANA */ 75 /*"CP1201", Windows */ 76 ), 77 ucs2be, 78 { ucs2be_mbtowc, NULL }, { ucs2be_wctomb, NULL }) 79 80DEFENCODING(( "UCS-2LE", /* glibc */ 81 "UNICODELITTLE", /* glibc */ 82 /*"CP1200", Windows */ 83 ), 84 ucs2le, 85 { ucs2le_mbtowc, NULL }, { ucs2le_wctomb, NULL }) 86 87DEFENCODING(( "UCS-4", /* glibc */ 88 "ISO-10646-UCS-4", /* IANA */ 89 "csUCS4", /* IANA */ 90 ), 91 ucs4, 92 { ucs4_mbtowc, NULL }, { ucs4_wctomb, NULL }) 93 94DEFENCODING(( "UCS-4BE", /* glibc */ 95 /*"CP12001", Windows */ 96 ), 97 ucs4be, 98 { ucs4be_mbtowc, NULL }, { ucs4be_wctomb, NULL }) 99 100DEFENCODING(( "UCS-4LE", /* glibc */ 101 /*"CP12000", Windows */ 102 ), 103 ucs4le, 104 { ucs4le_mbtowc, NULL }, { ucs4le_wctomb, NULL }) 105 106DEFENCODING(( "UTF-16", /* IANA, RFC 2781 */ 107 ), 108 utf16, 109 { utf16_mbtowc, NULL }, { utf16_wctomb, NULL }) 110 111DEFENCODING(( "UTF-16BE", /* IANA, RFC 2781 */ 112 ), 113 utf16be, 114 { utf16be_mbtowc, NULL }, { utf16be_wctomb, NULL }) 115 116DEFENCODING(( "UTF-16LE", /* IANA, RFC 2781 */ 117 ), 118 utf16le, 119 { utf16le_mbtowc, NULL }, { utf16le_wctomb, NULL }) 120 121DEFENCODING(( "UTF-32", /* IANA, Unicode 3.1 */ 122 ), 123 utf32, 124 { utf32_mbtowc, NULL }, { utf32_wctomb, NULL }) 125 126DEFENCODING(( "UTF-32BE", /* IANA, Unicode 3.1 */ 127 ), 128 utf32be, 129 { utf32be_mbtowc, NULL }, { utf32be_wctomb, NULL }) 130 131DEFENCODING(( "UTF-32LE", /* IANA, Unicode 3.1 */ 132 ), 133 utf32le, 134 { utf32le_mbtowc, NULL }, { utf32le_wctomb, NULL }) 135 136DEFENCODING(( "UTF-7", /* IANA, RFC 2152 */ 137 "UNICODE-1-1-UTF-7", /* IANA, RFC 1642 */ 138 "csUnicode11UTF7", /* IANA */ 139 /*"CP65000", Windows */ 140 ), 141 utf7, 142 { utf7_mbtowc, NULL }, { utf7_wctomb, utf7_reset }) 143 144DEFENCODING(( "UCS-2-INTERNAL", /* libiconv */ 145 ), 146 ucs2internal, 147 { ucs2internal_mbtowc, NULL }, { ucs2internal_wctomb, NULL }) 148 149DEFENCODING(( "UCS-2-SWAPPED", /* libiconv */ 150 ), 151 ucs2swapped, 152 { ucs2swapped_mbtowc, NULL }, { ucs2swapped_wctomb, NULL }) 153 154DEFENCODING(( "UCS-4-INTERNAL", /* libiconv */ 155 ), 156 ucs4internal, 157 { ucs4internal_mbtowc, NULL },{ ucs4internal_wctomb, NULL }) 158 159DEFENCODING(( "UCS-4-SWAPPED", /* libiconv */ 160 ), 161 ucs4swapped, 162 { ucs4swapped_mbtowc, NULL }, { ucs4swapped_wctomb, NULL }) 163 164/* Standard 8-bit encodings */ 165 166DEFENCODING(( "ISO-8859-1", /* IANA */ 167 "ISO_8859-1", /* IANA */ 168 "ISO_8859-1:1987", /* IANA */ 169 "ISO-IR-100", /* IANA */ 170 "CP819", /* IANA */ 171 "IBM819", /* IANA */ 172 "LATIN1", /* IANA */ 173 "L1", /* IANA */ 174 "csISOLatin1", /* IANA */ 175 "ISO8859-1", /* X11R6.4, glibc, FreeBSD */ 176 /*"ISO8859_1", JDK 1.1 */ 177 /*"CP28591", Windows */ 178 ), 179 iso8859_1, 180 { iso8859_1_mbtowc, NULL }, { iso8859_1_wctomb, NULL }) 181 182DEFENCODING(( "ISO-8859-2", /* IANA */ 183 "ISO_8859-2", /* IANA */ 184 "ISO_8859-2:1987", /* IANA */ 185 "ISO-IR-101", /* IANA */ 186 "LATIN2", /* IANA */ 187 "L2", /* IANA */ 188 "csISOLatin2", /* IANA */ 189 "ISO8859-2", /* X11R6.4, glibc, FreeBSD */ 190 /*"ISO8859_2", JDK 1.1 */ 191 /*"CP28592", Windows */ 192 ), 193 iso8859_2, 194 { iso8859_2_mbtowc, NULL }, { iso8859_2_wctomb, NULL }) 195 196DEFENCODING(( "ISO-8859-15", /* IANA, glibc */ 197 "ISO_8859-15", /* IANA */ 198 "ISO_8859-15:1998", /* glibc */ 199 "ISO-IR-203", 200 "LATIN-9", /* IANA */ 201 "ISO8859-15", /* glibc, FreeBSD */ 202 /*"CP28605", Windows */ 203 ), 204 iso8859_15, 205 { iso8859_15_mbtowc, NULL }, { iso8859_15_wctomb, NULL }) 206 207DEFENCODING(( "KOI8-R", /* IANA, RFC 1489, X11R6.4, JDK 1.1 */ 208 "csKOI8R", /* IANA */ 209 /*"CP20866", Windows */ 210 ), 211 koi8_r, 212 { koi8_r_mbtowc, NULL }, { koi8_r_wctomb, NULL }) 213 214/* Windows 8-bit encodings */ 215 216DEFENCODING(( "CP1250", /* JDK 1.1 */ 217 "WINDOWS-1250", /* IANA */ 218 "MS-EE", 219 ), 220 cp1250, 221 { cp1250_mbtowc, NULL }, { cp1250_wctomb, NULL }) 222 223/* DOS 8-bit encodings */ 224 225DEFENCODING(( "CP850", /* IANA, JDK 1.1 */ 226 "IBM850", /* IANA */ 227 "850", /* IANA */ 228 "csPC850Multilingual", /* IANA */ 229 ), 230 cp850, 231 { cp850_mbtowc, NULL }, { cp850_wctomb, NULL }) 232 233