| 1 |
// Any copyright to the test code below this comment is dedicated to the |
| 2 |
// Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ |
| 3 |
|
| 4 |
// THIS IS A GENERATED FILE. PLEASE DO NOT EDIT. |
| 5 |
// Instead, please regenerate using generate-encoding-data.py |
| 6 |
|
| 7 |
use super::*; |
| 8 |
|
| 9 |
#[test] |
| 10 |
fn test_all_labels() { |
| 11 |
assert_eq!(Encoding::for_label(b"l1"), Some(WINDOWS_1252)); |
| 12 |
assert_eq!(Encoding::for_label(b"l2"), Some(ISO_8859_2)); |
| 13 |
assert_eq!(Encoding::for_label(b"l3"), Some(ISO_8859_3)); |
| 14 |
assert_eq!(Encoding::for_label(b"l4"), Some(ISO_8859_4)); |
| 15 |
assert_eq!(Encoding::for_label(b"l5"), Some(WINDOWS_1254)); |
| 16 |
assert_eq!(Encoding::for_label(b"l6"), Some(ISO_8859_10)); |
| 17 |
assert_eq!(Encoding::for_label(b"l9"), Some(ISO_8859_15)); |
| 18 |
assert_eq!(Encoding::for_label(b"866"), Some(IBM866)); |
| 19 |
assert_eq!(Encoding::for_label(b"mac"), Some(MACINTOSH)); |
| 20 |
assert_eq!(Encoding::for_label(b"koi"), Some(KOI8_R)); |
| 21 |
assert_eq!(Encoding::for_label(b"gbk"), Some(GBK)); |
| 22 |
assert_eq!(Encoding::for_label(b"big5"), Some(BIG5)); |
| 23 |
assert_eq!(Encoding::for_label(b"utf8"), Some(UTF_8)); |
| 24 |
assert_eq!(Encoding::for_label(b"koi8"), Some(KOI8_R)); |
| 25 |
assert_eq!(Encoding::for_label(b"sjis"), Some(SHIFT_JIS)); |
| 26 |
assert_eq!(Encoding::for_label(b"ucs-2"), Some(UTF_16LE)); |
| 27 |
assert_eq!(Encoding::for_label(b"ms932"), Some(SHIFT_JIS)); |
| 28 |
assert_eq!(Encoding::for_label(b"cp866"), Some(IBM866)); |
| 29 |
assert_eq!(Encoding::for_label(b"utf-8"), Some(UTF_8)); |
| 30 |
assert_eq!(Encoding::for_label(b"cp819"), Some(WINDOWS_1252)); |
| 31 |
assert_eq!(Encoding::for_label(b"ascii"), Some(WINDOWS_1252)); |
| 32 |
assert_eq!(Encoding::for_label(b"x-gbk"), Some(GBK)); |
| 33 |
assert_eq!(Encoding::for_label(b"greek"), Some(ISO_8859_7)); |
| 34 |
assert_eq!(Encoding::for_label(b"cp1250"), Some(WINDOWS_1250)); |
| 35 |
assert_eq!(Encoding::for_label(b"cp1251"), Some(WINDOWS_1251)); |
| 36 |
assert_eq!(Encoding::for_label(b"latin1"), Some(WINDOWS_1252)); |
| 37 |
assert_eq!(Encoding::for_label(b"gb2312"), Some(GBK)); |
| 38 |
assert_eq!(Encoding::for_label(b"cp1252"), Some(WINDOWS_1252)); |
| 39 |
assert_eq!(Encoding::for_label(b"latin2"), Some(ISO_8859_2)); |
| 40 |
assert_eq!(Encoding::for_label(b"cp1253"), Some(WINDOWS_1253)); |
| 41 |
assert_eq!(Encoding::for_label(b"latin3"), Some(ISO_8859_3)); |
| 42 |
assert_eq!(Encoding::for_label(b"cp1254"), Some(WINDOWS_1254)); |
| 43 |
assert_eq!(Encoding::for_label(b"latin4"), Some(ISO_8859_4)); |
| 44 |
assert_eq!(Encoding::for_label(b"cp1255"), Some(WINDOWS_1255)); |
| 45 |
assert_eq!(Encoding::for_label(b"csbig5"), Some(BIG5)); |
| 46 |
assert_eq!(Encoding::for_label(b"latin5"), Some(WINDOWS_1254)); |
| 47 |
assert_eq!(Encoding::for_label(b"utf-16"), Some(UTF_16LE)); |
| 48 |
assert_eq!(Encoding::for_label(b"cp1256"), Some(WINDOWS_1256)); |
| 49 |
assert_eq!(Encoding::for_label(b"ibm866"), Some(IBM866)); |
| 50 |
assert_eq!(Encoding::for_label(b"latin6"), Some(ISO_8859_10)); |
| 51 |
assert_eq!(Encoding::for_label(b"cp1257"), Some(WINDOWS_1257)); |
| 52 |
assert_eq!(Encoding::for_label(b"cp1258"), Some(WINDOWS_1258)); |
| 53 |
assert_eq!(Encoding::for_label(b"greek8"), Some(ISO_8859_7)); |
| 54 |
assert_eq!(Encoding::for_label(b"ibm819"), Some(WINDOWS_1252)); |
| 55 |
assert_eq!(Encoding::for_label(b"arabic"), Some(ISO_8859_6)); |
| 56 |
assert_eq!(Encoding::for_label(b"visual"), Some(ISO_8859_8)); |
| 57 |
assert_eq!(Encoding::for_label(b"korean"), Some(EUC_KR)); |
| 58 |
assert_eq!(Encoding::for_label(b"euc-jp"), Some(EUC_JP)); |
| 59 |
assert_eq!(Encoding::for_label(b"koi8-r"), Some(KOI8_R)); |
| 60 |
assert_eq!(Encoding::for_label(b"koi8_r"), Some(KOI8_R)); |
| 61 |
assert_eq!(Encoding::for_label(b"euc-kr"), Some(EUC_KR)); |
| 62 |
assert_eq!(Encoding::for_label(b"x-sjis"), Some(SHIFT_JIS)); |
| 63 |
assert_eq!(Encoding::for_label(b"koi8-u"), Some(KOI8_U)); |
| 64 |
assert_eq!(Encoding::for_label(b"hebrew"), Some(ISO_8859_8)); |
| 65 |
assert_eq!(Encoding::for_label(b"tis-620"), Some(WINDOWS_874)); |
| 66 |
assert_eq!(Encoding::for_label(b"gb18030"), Some(GB18030)); |
| 67 |
assert_eq!(Encoding::for_label(b"ksc5601"), Some(EUC_KR)); |
| 68 |
assert_eq!(Encoding::for_label(b"gb_2312"), Some(GBK)); |
| 69 |
assert_eq!(Encoding::for_label(b"dos-874"), Some(WINDOWS_874)); |
| 70 |
assert_eq!(Encoding::for_label(b"cn-big5"), Some(BIG5)); |
| 71 |
assert_eq!(Encoding::for_label(b"unicode"), Some(UTF_16LE)); |
| 72 |
assert_eq!(Encoding::for_label(b"chinese"), Some(GBK)); |
| 73 |
assert_eq!(Encoding::for_label(b"logical"), Some(ISO_8859_8_I)); |
| 74 |
assert_eq!(Encoding::for_label(b"cskoi8r"), Some(KOI8_R)); |
| 75 |
assert_eq!(Encoding::for_label(b"cseuckr"), Some(EUC_KR)); |
| 76 |
assert_eq!(Encoding::for_label(b"koi8-ru"), Some(KOI8_U)); |
| 77 |
assert_eq!(Encoding::for_label(b"x-cp1250"), Some(WINDOWS_1250)); |
| 78 |
assert_eq!(Encoding::for_label(b"ksc_5601"), Some(EUC_KR)); |
| 79 |
assert_eq!(Encoding::for_label(b"x-cp1251"), Some(WINDOWS_1251)); |
| 80 |
assert_eq!(Encoding::for_label(b"iso88591"), Some(WINDOWS_1252)); |
| 81 |
assert_eq!(Encoding::for_label(b"csgb2312"), Some(GBK)); |
| 82 |
assert_eq!(Encoding::for_label(b"x-cp1252"), Some(WINDOWS_1252)); |
| 83 |
assert_eq!(Encoding::for_label(b"iso88592"), Some(ISO_8859_2)); |
| 84 |
assert_eq!(Encoding::for_label(b"x-cp1253"), Some(WINDOWS_1253)); |
| 85 |
assert_eq!(Encoding::for_label(b"iso88593"), Some(ISO_8859_3)); |
| 86 |
assert_eq!(Encoding::for_label(b"ecma-114"), Some(ISO_8859_6)); |
| 87 |
assert_eq!(Encoding::for_label(b"x-cp1254"), Some(WINDOWS_1254)); |
| 88 |
assert_eq!(Encoding::for_label(b"iso88594"), Some(ISO_8859_4)); |
| 89 |
assert_eq!(Encoding::for_label(b"x-cp1255"), Some(WINDOWS_1255)); |
| 90 |
assert_eq!(Encoding::for_label(b"iso88595"), Some(ISO_8859_5)); |
| 91 |
assert_eq!(Encoding::for_label(b"x-x-big5"), Some(BIG5)); |
| 92 |
assert_eq!(Encoding::for_label(b"x-cp1256"), Some(WINDOWS_1256)); |
| 93 |
assert_eq!(Encoding::for_label(b"csibm866"), Some(IBM866)); |
| 94 |
assert_eq!(Encoding::for_label(b"iso88596"), Some(ISO_8859_6)); |
| 95 |
assert_eq!(Encoding::for_label(b"x-cp1257"), Some(WINDOWS_1257)); |
| 96 |
assert_eq!(Encoding::for_label(b"iso88597"), Some(ISO_8859_7)); |
| 97 |
assert_eq!(Encoding::for_label(b"asmo-708"), Some(ISO_8859_6)); |
| 98 |
assert_eq!(Encoding::for_label(b"ecma-118"), Some(ISO_8859_7)); |
| 99 |
assert_eq!(Encoding::for_label(b"elot_928"), Some(ISO_8859_7)); |
| 100 |
assert_eq!(Encoding::for_label(b"x-cp1258"), Some(WINDOWS_1258)); |
| 101 |
assert_eq!(Encoding::for_label(b"iso88598"), Some(ISO_8859_8)); |
| 102 |
assert_eq!(Encoding::for_label(b"iso88599"), Some(WINDOWS_1254)); |
| 103 |
assert_eq!(Encoding::for_label(b"cyrillic"), Some(ISO_8859_5)); |
| 104 |
assert_eq!(Encoding::for_label(b"utf-16be"), Some(UTF_16BE)); |
| 105 |
assert_eq!(Encoding::for_label(b"utf-16le"), Some(UTF_16LE)); |
| 106 |
assert_eq!(Encoding::for_label(b"us-ascii"), Some(WINDOWS_1252)); |
| 107 |
assert_eq!(Encoding::for_label(b"ms_kanji"), Some(SHIFT_JIS)); |
| 108 |
assert_eq!(Encoding::for_label(b"x-euc-jp"), Some(EUC_JP)); |
| 109 |
assert_eq!(Encoding::for_label(b"iso885910"), Some(ISO_8859_10)); |
| 110 |
assert_eq!(Encoding::for_label(b"iso8859-1"), Some(WINDOWS_1252)); |
| 111 |
assert_eq!(Encoding::for_label(b"iso885911"), Some(WINDOWS_874)); |
| 112 |
assert_eq!(Encoding::for_label(b"iso8859-2"), Some(ISO_8859_2)); |
| 113 |
assert_eq!(Encoding::for_label(b"iso8859-3"), Some(ISO_8859_3)); |
| 114 |
assert_eq!(Encoding::for_label(b"iso885913"), Some(ISO_8859_13)); |
| 115 |
assert_eq!(Encoding::for_label(b"iso8859-4"), Some(ISO_8859_4)); |
| 116 |
assert_eq!(Encoding::for_label(b"iso885914"), Some(ISO_8859_14)); |
| 117 |
assert_eq!(Encoding::for_label(b"iso8859-5"), Some(ISO_8859_5)); |
| 118 |
assert_eq!(Encoding::for_label(b"iso885915"), Some(ISO_8859_15)); |
| 119 |
assert_eq!(Encoding::for_label(b"iso8859-6"), Some(ISO_8859_6)); |
| 120 |
assert_eq!(Encoding::for_label(b"iso8859-7"), Some(ISO_8859_7)); |
| 121 |
assert_eq!(Encoding::for_label(b"iso8859-8"), Some(ISO_8859_8)); |
| 122 |
assert_eq!(Encoding::for_label(b"iso-ir-58"), Some(GBK)); |
| 123 |
assert_eq!(Encoding::for_label(b"iso8859-9"), Some(WINDOWS_1254)); |
| 124 |
assert_eq!(Encoding::for_label(b"csunicode"), Some(UTF_16LE)); |
| 125 |
assert_eq!(Encoding::for_label(b"macintosh"), Some(MACINTOSH)); |
| 126 |
assert_eq!(Encoding::for_label(b"shift-jis"), Some(SHIFT_JIS)); |
| 127 |
assert_eq!(Encoding::for_label(b"shift_jis"), Some(SHIFT_JIS)); |
| 128 |
assert_eq!(Encoding::for_label(b"iso-ir-100"), Some(WINDOWS_1252)); |
| 129 |
assert_eq!(Encoding::for_label(b"iso8859-10"), Some(ISO_8859_10)); |
| 130 |
assert_eq!(Encoding::for_label(b"iso-ir-110"), Some(ISO_8859_4)); |
| 131 |
assert_eq!(Encoding::for_label(b"gb_2312-80"), Some(GBK)); |
| 132 |
assert_eq!(Encoding::for_label(b"iso-8859-1"), Some(WINDOWS_1252)); |
| 133 |
assert_eq!(Encoding::for_label(b"iso_8859-1"), Some(WINDOWS_1252)); |
| 134 |
assert_eq!(Encoding::for_label(b"iso-ir-101"), Some(ISO_8859_2)); |
| 135 |
assert_eq!(Encoding::for_label(b"iso8859-11"), Some(WINDOWS_874)); |
| 136 |
assert_eq!(Encoding::for_label(b"iso-8859-2"), Some(ISO_8859_2)); |
| 137 |
assert_eq!(Encoding::for_label(b"iso_8859-2"), Some(ISO_8859_2)); |
| 138 |
assert_eq!(Encoding::for_label(b"hz-gb-2312"), Some(REPLACEMENT)); |
| 139 |
assert_eq!(Encoding::for_label(b"iso-8859-3"), Some(ISO_8859_3)); |
| 140 |
assert_eq!(Encoding::for_label(b"iso_8859-3"), Some(ISO_8859_3)); |
| 141 |
assert_eq!(Encoding::for_label(b"iso8859-13"), Some(ISO_8859_13)); |
| 142 |
assert_eq!(Encoding::for_label(b"iso-8859-4"), Some(ISO_8859_4)); |
| 143 |
assert_eq!(Encoding::for_label(b"iso_8859-4"), Some(ISO_8859_4)); |
| 144 |
assert_eq!(Encoding::for_label(b"iso8859-14"), Some(ISO_8859_14)); |
| 145 |
assert_eq!(Encoding::for_label(b"iso-ir-144"), Some(ISO_8859_5)); |
| 146 |
assert_eq!(Encoding::for_label(b"iso-8859-5"), Some(ISO_8859_5)); |
| 147 |
assert_eq!(Encoding::for_label(b"iso_8859-5"), Some(ISO_8859_5)); |
| 148 |
assert_eq!(Encoding::for_label(b"iso8859-15"), Some(ISO_8859_15)); |
| 149 |
assert_eq!(Encoding::for_label(b"iso-8859-6"), Some(ISO_8859_6)); |
| 150 |
assert_eq!(Encoding::for_label(b"iso_8859-6"), Some(ISO_8859_6)); |
| 151 |
assert_eq!(Encoding::for_label(b"iso-ir-126"), Some(ISO_8859_7)); |
| 152 |
assert_eq!(Encoding::for_label(b"iso-8859-7"), Some(ISO_8859_7)); |
| 153 |
assert_eq!(Encoding::for_label(b"iso_8859-7"), Some(ISO_8859_7)); |
| 154 |
assert_eq!(Encoding::for_label(b"iso-ir-127"), Some(ISO_8859_6)); |
| 155 |
assert_eq!(Encoding::for_label(b"iso-ir-157"), Some(ISO_8859_10)); |
| 156 |
assert_eq!(Encoding::for_label(b"iso-8859-8"), Some(ISO_8859_8)); |
| 157 |
assert_eq!(Encoding::for_label(b"iso_8859-8"), Some(ISO_8859_8)); |
| 158 |
assert_eq!(Encoding::for_label(b"iso-ir-138"), Some(ISO_8859_8)); |
| 159 |
assert_eq!(Encoding::for_label(b"iso-ir-148"), Some(WINDOWS_1254)); |
| 160 |
assert_eq!(Encoding::for_label(b"iso-8859-9"), Some(WINDOWS_1254)); |
| 161 |
assert_eq!(Encoding::for_label(b"iso_8859-9"), Some(WINDOWS_1254)); |
| 162 |
assert_eq!(Encoding::for_label(b"iso-ir-109"), Some(ISO_8859_3)); |
| 163 |
assert_eq!(Encoding::for_label(b"iso-ir-149"), Some(EUC_KR)); |
| 164 |
assert_eq!(Encoding::for_label(b"big5-hkscs"), Some(BIG5)); |
| 165 |
assert_eq!(Encoding::for_label(b"csshiftjis"), Some(SHIFT_JIS)); |
| 166 |
assert_eq!(Encoding::for_label(b"iso-8859-10"), Some(ISO_8859_10)); |
| 167 |
assert_eq!(Encoding::for_label(b"iso-8859-11"), Some(WINDOWS_874)); |
| 168 |
assert_eq!(Encoding::for_label(b"csisolatin1"), Some(WINDOWS_1252)); |
| 169 |
assert_eq!(Encoding::for_label(b"csisolatin2"), Some(ISO_8859_2)); |
| 170 |
assert_eq!(Encoding::for_label(b"iso-8859-13"), Some(ISO_8859_13)); |
| 171 |
assert_eq!(Encoding::for_label(b"csisolatin3"), Some(ISO_8859_3)); |
| 172 |
assert_eq!(Encoding::for_label(b"iso-8859-14"), Some(ISO_8859_14)); |
| 173 |
assert_eq!(Encoding::for_label(b"windows-874"), Some(WINDOWS_874)); |
| 174 |
assert_eq!(Encoding::for_label(b"csisolatin4"), Some(ISO_8859_4)); |
| 175 |
assert_eq!(Encoding::for_label(b"iso-8859-15"), Some(ISO_8859_15)); |
| 176 |
assert_eq!(Encoding::for_label(b"iso_8859-15"), Some(ISO_8859_15)); |
| 177 |
assert_eq!(Encoding::for_label(b"csisolatin5"), Some(WINDOWS_1254)); |
| 178 |
assert_eq!(Encoding::for_label(b"iso-8859-16"), Some(ISO_8859_16)); |
| 179 |
assert_eq!(Encoding::for_label(b"csisolatin6"), Some(ISO_8859_10)); |
| 180 |
assert_eq!(Encoding::for_label(b"windows-949"), Some(EUC_KR)); |
| 181 |
assert_eq!(Encoding::for_label(b"csisolatin9"), Some(ISO_8859_15)); |
| 182 |
assert_eq!(Encoding::for_label(b"csiso88596e"), Some(ISO_8859_6)); |
| 183 |
assert_eq!(Encoding::for_label(b"csiso88598e"), Some(ISO_8859_8)); |
| 184 |
assert_eq!(Encoding::for_label(b"unicodefffe"), Some(UTF_16BE)); |
| 185 |
assert_eq!(Encoding::for_label(b"unicodefeff"), Some(UTF_16LE)); |
| 186 |
assert_eq!(Encoding::for_label(b"csmacintosh"), Some(MACINTOSH)); |
| 187 |
assert_eq!(Encoding::for_label(b"csiso88596i"), Some(ISO_8859_6)); |
| 188 |
assert_eq!(Encoding::for_label(b"csiso88598i"), Some(ISO_8859_8_I)); |
| 189 |
assert_eq!(Encoding::for_label(b"windows-31j"), Some(SHIFT_JIS)); |
| 190 |
assert_eq!(Encoding::for_label(b"x-mac-roman"), Some(MACINTOSH)); |
| 191 |
assert_eq!(Encoding::for_label(b"iso-2022-cn"), Some(REPLACEMENT)); |
| 192 |
assert_eq!(Encoding::for_label(b"iso-2022-jp"), Some(ISO_2022_JP)); |
| 193 |
assert_eq!(Encoding::for_label(b"csiso2022jp"), Some(ISO_2022_JP)); |
| 194 |
assert_eq!(Encoding::for_label(b"iso-2022-kr"), Some(REPLACEMENT)); |
| 195 |
assert_eq!(Encoding::for_label(b"csiso2022kr"), Some(REPLACEMENT)); |
| 196 |
assert_eq!(Encoding::for_label(b"replacement"), Some(REPLACEMENT)); |
| 197 |
assert_eq!(Encoding::for_label(b"windows-1250"), Some(WINDOWS_1250)); |
| 198 |
assert_eq!(Encoding::for_label(b"windows-1251"), Some(WINDOWS_1251)); |
| 199 |
assert_eq!(Encoding::for_label(b"windows-1252"), Some(WINDOWS_1252)); |
| 200 |
assert_eq!(Encoding::for_label(b"windows-1253"), Some(WINDOWS_1253)); |
| 201 |
assert_eq!(Encoding::for_label(b"windows-1254"), Some(WINDOWS_1254)); |
| 202 |
assert_eq!(Encoding::for_label(b"windows-1255"), Some(WINDOWS_1255)); |
| 203 |
assert_eq!(Encoding::for_label(b"windows-1256"), Some(WINDOWS_1256)); |
| 204 |
assert_eq!(Encoding::for_label(b"windows-1257"), Some(WINDOWS_1257)); |
| 205 |
assert_eq!(Encoding::for_label(b"windows-1258"), Some(WINDOWS_1258)); |
| 206 |
assert_eq!(Encoding::for_label(b"iso-8859-6-e"), Some(ISO_8859_6)); |
| 207 |
assert_eq!(Encoding::for_label(b"iso-8859-8-e"), Some(ISO_8859_8)); |
| 208 |
assert_eq!(Encoding::for_label(b"iso-8859-6-i"), Some(ISO_8859_6)); |
| 209 |
assert_eq!(Encoding::for_label(b"iso-8859-8-i"), Some(ISO_8859_8_I)); |
| 210 |
assert_eq!(Encoding::for_label(b"sun_eu_greek"), Some(ISO_8859_7)); |
| 211 |
assert_eq!(Encoding::for_label(b"csksc56011987"), Some(EUC_KR)); |
| 212 |
assert_eq!(Encoding::for_label(b"unicode20utf8"), Some(UTF_8)); |
| 213 |
assert_eq!(Encoding::for_label(b"unicode11utf8"), Some(UTF_8)); |
| 214 |
assert_eq!(Encoding::for_label(b"ks_c_5601-1987"), Some(EUC_KR)); |
| 215 |
assert_eq!(Encoding::for_label(b"ansi_x3.4-1968"), Some(WINDOWS_1252)); |
| 216 |
assert_eq!(Encoding::for_label(b"ks_c_5601-1989"), Some(EUC_KR)); |
| 217 |
assert_eq!(Encoding::for_label(b"x-mac-cyrillic"), Some(X_MAC_CYRILLIC)); |
| 218 |
assert_eq!(Encoding::for_label(b"x-user-defined"), Some(X_USER_DEFINED)); |
| 219 |
assert_eq!(Encoding::for_label(b"csiso58gb231280"), Some(GBK)); |
| 220 |
assert_eq!(Encoding::for_label(b"iso-10646-ucs-2"), Some(UTF_16LE)); |
| 221 |
assert_eq!(Encoding::for_label(b"iso_8859-1:1987"), Some(WINDOWS_1252)); |
| 222 |
assert_eq!(Encoding::for_label(b"iso_8859-2:1987"), Some(ISO_8859_2)); |
| 223 |
assert_eq!(Encoding::for_label(b"iso_8859-6:1987"), Some(ISO_8859_6)); |
| 224 |
assert_eq!(Encoding::for_label(b"iso_8859-7:1987"), Some(ISO_8859_7)); |
| 225 |
assert_eq!(Encoding::for_label(b"iso_8859-3:1988"), Some(ISO_8859_3)); |
| 226 |
assert_eq!(Encoding::for_label(b"iso_8859-4:1988"), Some(ISO_8859_4)); |
| 227 |
assert_eq!(Encoding::for_label(b"iso_8859-5:1988"), Some(ISO_8859_5)); |
| 228 |
assert_eq!(Encoding::for_label(b"iso_8859-8:1988"), Some(ISO_8859_8)); |
| 229 |
assert_eq!(Encoding::for_label(b"x-unicode20utf8"), Some(UTF_8)); |
| 230 |
assert_eq!(Encoding::for_label(b"iso_8859-9:1989"), Some(WINDOWS_1254)); |
| 231 |
assert_eq!(Encoding::for_label(b"csisolatingreek"), Some(ISO_8859_7)); |
| 232 |
assert_eq!( |
| 233 |
Encoding::for_label(b"x-mac-ukrainian"), |
| 234 |
Some(X_MAC_CYRILLIC) |
| 235 |
); |
| 236 |
assert_eq!(Encoding::for_label(b"iso-2022-cn-ext"), Some(REPLACEMENT)); |
| 237 |
assert_eq!(Encoding::for_label(b"csisolatinarabic"), Some(ISO_8859_6)); |
| 238 |
assert_eq!(Encoding::for_label(b"csisolatinhebrew"), Some(ISO_8859_8)); |
| 239 |
assert_eq!(Encoding::for_label(b"unicode-1-1-utf-8"), Some(UTF_8)); |
| 240 |
assert_eq!(Encoding::for_label(b"csisolatincyrillic"), Some(ISO_8859_5)); |
| 241 |
assert_eq!(Encoding::for_label(b"cseucpkdfmtjapanese"), Some(EUC_JP)); |
| 242 |
} |