11cb0ef41Sopenharmony_ci// This list was inspired by these sources: 21cb0ef41Sopenharmony_ci// - https://annevankesteren.nl/2010/8-bit-labels 31cb0ef41Sopenharmony_ci// - http://l0.cm/encodings/table/ 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci[ 61cb0ef41Sopenharmony_ci "437", 71cb0ef41Sopenharmony_ci "adobe-standard-encoding", 81cb0ef41Sopenharmony_ci "armscii-8", 91cb0ef41Sopenharmony_ci "bocu-1", 101cb0ef41Sopenharmony_ci "cesu-8", 111cb0ef41Sopenharmony_ci "cp1025", 121cb0ef41Sopenharmony_ci "cp437", 131cb0ef41Sopenharmony_ci "cp737", 141cb0ef41Sopenharmony_ci "cp851", 151cb0ef41Sopenharmony_ci "cp858", 161cb0ef41Sopenharmony_ci "cp862", 171cb0ef41Sopenharmony_ci "cp864", 181cb0ef41Sopenharmony_ci "cp869", 191cb0ef41Sopenharmony_ci "cp875", 201cb0ef41Sopenharmony_ci "cp950", 211cb0ef41Sopenharmony_ci "csiso103t618bit", 221cb0ef41Sopenharmony_ci "csiso111ecmacyrillic", 231cb0ef41Sopenharmony_ci "cspc8codepage437", 241cb0ef41Sopenharmony_ci "csviscii", 251cb0ef41Sopenharmony_ci "dos-720", 261cb0ef41Sopenharmony_ci "dos-862", 271cb0ef41Sopenharmony_ci "ecma-cyrillic", 281cb0ef41Sopenharmony_ci "euc-tw", 291cb0ef41Sopenharmony_ci "german", 301cb0ef41Sopenharmony_ci "geostd8", 311cb0ef41Sopenharmony_ci "hp-roman8", 321cb0ef41Sopenharmony_ci "ibm-thai", 331cb0ef41Sopenharmony_ci "ibm00858", 341cb0ef41Sopenharmony_ci "ibm00924", 351cb0ef41Sopenharmony_ci "ibm01047", 361cb0ef41Sopenharmony_ci "ibm01140", 371cb0ef41Sopenharmony_ci "ibm01141", 381cb0ef41Sopenharmony_ci "ibm01142", 391cb0ef41Sopenharmony_ci "ibm01143", 401cb0ef41Sopenharmony_ci "ibm01144", 411cb0ef41Sopenharmony_ci "ibm01145", 421cb0ef41Sopenharmony_ci "ibm01146", 431cb0ef41Sopenharmony_ci "ibm01147", 441cb0ef41Sopenharmony_ci "ibm01148", 451cb0ef41Sopenharmony_ci "ibm01149", 461cb0ef41Sopenharmony_ci "ibm037", 471cb0ef41Sopenharmony_ci "ibm1026", 481cb0ef41Sopenharmony_ci "ibm1047", 491cb0ef41Sopenharmony_ci "ibm273", 501cb0ef41Sopenharmony_ci "ibm277", 511cb0ef41Sopenharmony_ci "ibm278", 521cb0ef41Sopenharmony_ci "ibm280", 531cb0ef41Sopenharmony_ci "ibm284", 541cb0ef41Sopenharmony_ci "ibm285", 551cb0ef41Sopenharmony_ci "ibm290", 561cb0ef41Sopenharmony_ci "ibm297", 571cb0ef41Sopenharmony_ci "ibm367", 581cb0ef41Sopenharmony_ci "ibm420", 591cb0ef41Sopenharmony_ci "ibm423", 601cb0ef41Sopenharmony_ci "ibm424", 611cb0ef41Sopenharmony_ci "ibm437", 621cb0ef41Sopenharmony_ci "ibm500", 631cb0ef41Sopenharmony_ci "ibm737", 641cb0ef41Sopenharmony_ci "ibm775", 651cb0ef41Sopenharmony_ci "ibm850", 661cb0ef41Sopenharmony_ci "ibm852", 671cb0ef41Sopenharmony_ci "ibm855", 681cb0ef41Sopenharmony_ci "ibm857", 691cb0ef41Sopenharmony_ci "ibm860", 701cb0ef41Sopenharmony_ci "ibm861", 711cb0ef41Sopenharmony_ci "ibm862", 721cb0ef41Sopenharmony_ci "ibm863", 731cb0ef41Sopenharmony_ci "ibm864", 741cb0ef41Sopenharmony_ci "ibm864i", 751cb0ef41Sopenharmony_ci "ibm865", 761cb0ef41Sopenharmony_ci "ibm868", 771cb0ef41Sopenharmony_ci "ibm869", 781cb0ef41Sopenharmony_ci "ibm870", 791cb0ef41Sopenharmony_ci "ibm871", 801cb0ef41Sopenharmony_ci "ibm880", 811cb0ef41Sopenharmony_ci "ibm905", 821cb0ef41Sopenharmony_ci "ibm918", 831cb0ef41Sopenharmony_ci "iso-2022-jp-1", 841cb0ef41Sopenharmony_ci "iso-2022-jp-2", 851cb0ef41Sopenharmony_ci "iso-2022-jp-3", 861cb0ef41Sopenharmony_ci "iso-8859-8 visual", 871cb0ef41Sopenharmony_ci "jis_c6226-1978", 881cb0ef41Sopenharmony_ci "jis_x0208-1983", 891cb0ef41Sopenharmony_ci "jis_x0208-1990", 901cb0ef41Sopenharmony_ci "jis_x0212-1990", 911cb0ef41Sopenharmony_ci "johab", 921cb0ef41Sopenharmony_ci "latin9", 931cb0ef41Sopenharmony_ci "norwegian", 941cb0ef41Sopenharmony_ci "sami-ws2", 951cb0ef41Sopenharmony_ci "scsu", 961cb0ef41Sopenharmony_ci "shift_jis_x0213-2000", 971cb0ef41Sopenharmony_ci "swedish", 981cb0ef41Sopenharmony_ci "tcvn", 991cb0ef41Sopenharmony_ci "tis-620-2533", 1001cb0ef41Sopenharmony_ci "utf-7", 1011cb0ef41Sopenharmony_ci "utf-32", 1021cb0ef41Sopenharmony_ci "viscii", 1031cb0ef41Sopenharmony_ci "windows-936-2000", 1041cb0ef41Sopenharmony_ci "windows-sami-2", 1051cb0ef41Sopenharmony_ci "ws2", 1061cb0ef41Sopenharmony_ci "x-chinese-cns", 1071cb0ef41Sopenharmony_ci "x-chinese-eten", 1081cb0ef41Sopenharmony_ci "x-cp20001", 1091cb0ef41Sopenharmony_ci "x-cp20003", 1101cb0ef41Sopenharmony_ci "x-cp20004", 1111cb0ef41Sopenharmony_ci "x-cp20005", 1121cb0ef41Sopenharmony_ci "x-cp20261", 1131cb0ef41Sopenharmony_ci "x-cp20269", 1141cb0ef41Sopenharmony_ci "x-cp20936", 1151cb0ef41Sopenharmony_ci "x-cp20949", 1161cb0ef41Sopenharmony_ci "x-cp21027", 1171cb0ef41Sopenharmony_ci "x-cp50227", 1181cb0ef41Sopenharmony_ci "x-cp50229", 1191cb0ef41Sopenharmony_ci "x-ebcdic-koreanextended", 1201cb0ef41Sopenharmony_ci "x-europa", 1211cb0ef41Sopenharmony_ci "x-ia5", 1221cb0ef41Sopenharmony_ci "x-ia5-german", 1231cb0ef41Sopenharmony_ci "x-ia5-norwegian", 1241cb0ef41Sopenharmony_ci "x-ia5-swedish", 1251cb0ef41Sopenharmony_ci "x-iscii-as", 1261cb0ef41Sopenharmony_ci "x-iscii-be", 1271cb0ef41Sopenharmony_ci "x-iscii-de", 1281cb0ef41Sopenharmony_ci "x-iscii-gu", 1291cb0ef41Sopenharmony_ci "x-iscii-ka", 1301cb0ef41Sopenharmony_ci "x-iscii-ma", 1311cb0ef41Sopenharmony_ci "x-iscii-or", 1321cb0ef41Sopenharmony_ci "x-iscii-pa", 1331cb0ef41Sopenharmony_ci "x-iscii-t", 1341cb0ef41Sopenharmony_ci "x-iscii-ta", 1351cb0ef41Sopenharmony_ci "x-iscii-te", 1361cb0ef41Sopenharmony_ci "x-mac-arabic", 1371cb0ef41Sopenharmony_ci "x-mac-ce", 1381cb0ef41Sopenharmony_ci "x-mac-centraleurroman", 1391cb0ef41Sopenharmony_ci "x-mac-chinesesimp", 1401cb0ef41Sopenharmony_ci "x-mac-chinesetrad", 1411cb0ef41Sopenharmony_ci "x-mac-croatian", 1421cb0ef41Sopenharmony_ci "x-mac-devanagari", 1431cb0ef41Sopenharmony_ci "x-mac-dingbats", 1441cb0ef41Sopenharmony_ci "x-mac-farsi", 1451cb0ef41Sopenharmony_ci "x-mac-greek", 1461cb0ef41Sopenharmony_ci "x-mac-gujarati", 1471cb0ef41Sopenharmony_ci "x-mac-gurmukhi", 1481cb0ef41Sopenharmony_ci "x-mac-hebrew", 1491cb0ef41Sopenharmony_ci "x-mac-icelandic", 1501cb0ef41Sopenharmony_ci "x-mac-japanese", 1511cb0ef41Sopenharmony_ci "x-mac-korean", 1521cb0ef41Sopenharmony_ci "x-mac-roman-latin1", 1531cb0ef41Sopenharmony_ci "x-mac-romanian", 1541cb0ef41Sopenharmony_ci "x-mac-symbol", 1551cb0ef41Sopenharmony_ci "x-mac-thai", 1561cb0ef41Sopenharmony_ci "x-mac-tibetan", 1571cb0ef41Sopenharmony_ci "x-mac-turkish", 1581cb0ef41Sopenharmony_ci "x-mac-vt100", 1591cb0ef41Sopenharmony_ci "x-nextstep", 1601cb0ef41Sopenharmony_ci "x-vps", 1611cb0ef41Sopenharmony_ci "_autodetect", 1621cb0ef41Sopenharmony_ci "_autodetect_all", 1631cb0ef41Sopenharmony_ci "_autodetect_kr" 1641cb0ef41Sopenharmony_ci].forEach(label => { 1651cb0ef41Sopenharmony_ci async_test(t => { 1661cb0ef41Sopenharmony_ci const frame = document.createElement("iframe"); 1671cb0ef41Sopenharmony_ci t.add_cleanup(() => { 1681cb0ef41Sopenharmony_ci frame.remove(); 1691cb0ef41Sopenharmony_ci }); 1701cb0ef41Sopenharmony_ci // Intentionally use <meta> as Content-Type results in browser differences 1711cb0ef41Sopenharmony_ci // See /html/syntax/charset/inheritance-bogus-meta.html 1721cb0ef41Sopenharmony_ci frame.src = "resources/text-html-meta-charset.py?label=" + label; 1731cb0ef41Sopenharmony_ci frame.onload = t.step_func_done(() => { 1741cb0ef41Sopenharmony_ci // UTF-8 as it inherits from the parent document when unrecognized 1751cb0ef41Sopenharmony_ci assert_equals(frame.contentDocument.characterSet, "UTF-8"); 1761cb0ef41Sopenharmony_ci assert_equals(frame.contentDocument.inputEncoding, "UTF-8"); 1771cb0ef41Sopenharmony_ci }); 1781cb0ef41Sopenharmony_ci document.body.append(frame); 1791cb0ef41Sopenharmony_ci }, `${label} is not supported by the Encoding Standard`); 1801cb0ef41Sopenharmony_ci}); 181