Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Side by Side Diff: pkg/third_party/html5lib/lib/src/constants.dart

Issue 157983005: pkg/third_party/html5lib: lots of cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: const Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library constants; 1 library constants;
2 2
3 import 'utils.dart'; 3 import 'utils.dart';
4 import 'token.dart';
5 4
6 // TODO(jmesserly): fix up the const lists. For the bigger ones, we need faster 5 // TODO(jmesserly): fix up the const lists. For the bigger ones, we need faster
7 // lookup than linear search "contains". In the Python code they were 6 // lookup than linear search "contains". In the Python code they were
8 // frozensets. 7 // frozensets.
9 8
10 final String EOF = null; 9 final String EOF = null;
11 10
12 class ReparseException implements Exception { 11 class ReparseException implements Exception {
13 final String message; 12 final String message;
14 ReparseException(this.message); 13 ReparseException(this.message);
15 String toString() => "ReparseException: $message"; 14 String toString() => "ReparseException: $message";
16 } 15 }
17 16
18 // TODO(jmesserly): assuming the programmatic name is not important, it would be 17 // TODO(jmesserly): assuming the programmatic name is not important, it would be
19 // good to make these "static const" fields on an ErrorMessage class. 18 // good to make these "static const" fields on an ErrorMessage class.
20 /** 19 /**
21 * These are error messages emitted by [HtmlParser]. The values use Python style 20 * These are error messages emitted by [HtmlParser]. The values use Python style
22 * string formatting, as implemented by [formatStr]. That function only supports 21 * string formatting, as implemented by [formatStr]. That function only supports
23 * the subset of format functionality used here. 22 * the subset of format functionality used here.
24 */ 23 */
25 final Map<String, String> errorMessages = const { 24 const Map<String, String> errorMessages = const {
26 "null-character": 25 "null-character":
27 "Null character in input stream, replaced with U+FFFD.", 26 "Null character in input stream, replaced with U+FFFD.",
28 "invalid-codepoint": 27 "invalid-codepoint":
29 "Invalid codepoint in stream.", 28 "Invalid codepoint in stream.",
30 "incorrectly-placed-solidus": 29 "incorrectly-placed-solidus":
31 "Solidus (/) incorrectly placed in tag.", 30 "Solidus (/) incorrectly placed in tag.",
32 "incorrect-cr-newline-entity": 31 "incorrect-cr-newline-entity":
33 "Incorrect CR newline entity, replaced with LF.", 32 "Incorrect CR newline entity, replaced with LF.",
34 "illegal-windows-1252-entity": 33 "illegal-windows-1252-entity":
35 "Entity used with illegal number (windows-1252 reference).", 34 "Entity used with illegal number (windows-1252 reference).",
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 case mathml: return 'math'; 316 case mathml: return 'math';
318 case svg: return 'svg'; 317 case svg: return 'svg';
319 case xlink: return 'xlink'; 318 case xlink: return 'xlink';
320 case xml: return 'xml'; 319 case xml: return 'xml';
321 case xmlns: return 'xmlns'; 320 case xmlns: return 'xmlns';
322 default: throw new ArgumentError(url); 321 default: throw new ArgumentError(url);
323 } 322 }
324 } 323 }
325 } 324 }
326 325
327 final List scopingElements = const [ 326 const List scopingElements = const [
328 const Pair(Namespaces.html, "applet"), 327 const Pair(Namespaces.html, "applet"),
329 const Pair(Namespaces.html, "caption"), 328 const Pair(Namespaces.html, "caption"),
330 const Pair(Namespaces.html, "html"), 329 const Pair(Namespaces.html, "html"),
331 const Pair(Namespaces.html, "marquee"), 330 const Pair(Namespaces.html, "marquee"),
332 const Pair(Namespaces.html, "object"), 331 const Pair(Namespaces.html, "object"),
333 const Pair(Namespaces.html, "table"), 332 const Pair(Namespaces.html, "table"),
334 const Pair(Namespaces.html, "td"), 333 const Pair(Namespaces.html, "td"),
335 const Pair(Namespaces.html, "th"), 334 const Pair(Namespaces.html, "th"),
336 const Pair(Namespaces.mathml, "mi"), 335 const Pair(Namespaces.mathml, "mi"),
337 const Pair(Namespaces.mathml, "mo"), 336 const Pair(Namespaces.mathml, "mo"),
338 const Pair(Namespaces.mathml, "mn"), 337 const Pair(Namespaces.mathml, "mn"),
339 const Pair(Namespaces.mathml, "ms"), 338 const Pair(Namespaces.mathml, "ms"),
340 const Pair(Namespaces.mathml, "mtext"), 339 const Pair(Namespaces.mathml, "mtext"),
341 const Pair(Namespaces.mathml, "annotation-xml"), 340 const Pair(Namespaces.mathml, "annotation-xml"),
342 const Pair(Namespaces.svg, "foreignObject"), 341 const Pair(Namespaces.svg, "foreignObject"),
343 const Pair(Namespaces.svg, "desc"), 342 const Pair(Namespaces.svg, "desc"),
344 const Pair(Namespaces.svg, "title") 343 const Pair(Namespaces.svg, "title")
345 ]; 344 ];
346 345
347 346
348 final formattingElements = const [ 347 const formattingElements = const [
349 const Pair(Namespaces.html, "a"), 348 const Pair(Namespaces.html, "a"),
350 const Pair(Namespaces.html, "b"), 349 const Pair(Namespaces.html, "b"),
351 const Pair(Namespaces.html, "big"), 350 const Pair(Namespaces.html, "big"),
352 const Pair(Namespaces.html, "code"), 351 const Pair(Namespaces.html, "code"),
353 const Pair(Namespaces.html, "em"), 352 const Pair(Namespaces.html, "em"),
354 const Pair(Namespaces.html, "font"), 353 const Pair(Namespaces.html, "font"),
355 const Pair(Namespaces.html, "i"), 354 const Pair(Namespaces.html, "i"),
356 const Pair(Namespaces.html, "nobr"), 355 const Pair(Namespaces.html, "nobr"),
357 const Pair(Namespaces.html, "s"), 356 const Pair(Namespaces.html, "s"),
358 const Pair(Namespaces.html, "small"), 357 const Pair(Namespaces.html, "small"),
359 const Pair(Namespaces.html, "strike"), 358 const Pair(Namespaces.html, "strike"),
360 const Pair(Namespaces.html, "strong"), 359 const Pair(Namespaces.html, "strong"),
361 const Pair(Namespaces.html, "tt"), 360 const Pair(Namespaces.html, "tt"),
362 const Pair(Namespaces.html, "") 361 const Pair(Namespaces.html, "")
363 ]; 362 ];
364 363
365 final specialElements = const [ 364 const specialElements = const [
366 const Pair(Namespaces.html, "address"), 365 const Pair(Namespaces.html, "address"),
367 const Pair(Namespaces.html, "applet"), 366 const Pair(Namespaces.html, "applet"),
368 const Pair(Namespaces.html, "area"), 367 const Pair(Namespaces.html, "area"),
369 const Pair(Namespaces.html, "article"), 368 const Pair(Namespaces.html, "article"),
370 const Pair(Namespaces.html, "aside"), 369 const Pair(Namespaces.html, "aside"),
371 const Pair(Namespaces.html, "base"), 370 const Pair(Namespaces.html, "base"),
372 const Pair(Namespaces.html, "basefont"), 371 const Pair(Namespaces.html, "basefont"),
373 const Pair(Namespaces.html, "bgsound"), 372 const Pair(Namespaces.html, "bgsound"),
374 const Pair(Namespaces.html, "blockquote"), 373 const Pair(Namespaces.html, "blockquote"),
375 const Pair(Namespaces.html, "body"), 374 const Pair(Namespaces.html, "body"),
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 const Pair(Namespaces.html, "th"), 437 const Pair(Namespaces.html, "th"),
439 const Pair(Namespaces.html, "thead"), 438 const Pair(Namespaces.html, "thead"),
440 const Pair(Namespaces.html, "title"), 439 const Pair(Namespaces.html, "title"),
441 const Pair(Namespaces.html, "tr"), 440 const Pair(Namespaces.html, "tr"),
442 const Pair(Namespaces.html, "ul"), 441 const Pair(Namespaces.html, "ul"),
443 const Pair(Namespaces.html, "wbr"), 442 const Pair(Namespaces.html, "wbr"),
444 const Pair(Namespaces.html, "xmp"), 443 const Pair(Namespaces.html, "xmp"),
445 const Pair(Namespaces.svg, "foreignObject") 444 const Pair(Namespaces.svg, "foreignObject")
446 ]; 445 ];
447 446
448 final htmlIntegrationPointElements = const [ 447 const htmlIntegrationPointElements = const [
449 const Pair(Namespaces.mathml, "annotaion-xml"), 448 const Pair(Namespaces.mathml, "annotaion-xml"),
450 const Pair(Namespaces.svg, "foreignObject"), 449 const Pair(Namespaces.svg, "foreignObject"),
451 const Pair(Namespaces.svg, "desc"), 450 const Pair(Namespaces.svg, "desc"),
452 const Pair(Namespaces.svg, "title") 451 const Pair(Namespaces.svg, "title")
453 ]; 452 ];
454 453
455 final mathmlTextIntegrationPointElements = const [ 454 const mathmlTextIntegrationPointElements = const [
456 const Pair(Namespaces.mathml, "mi"), 455 const Pair(Namespaces.mathml, "mi"),
457 const Pair(Namespaces.mathml, "mo"), 456 const Pair(Namespaces.mathml, "mo"),
458 const Pair(Namespaces.mathml, "mn"), 457 const Pair(Namespaces.mathml, "mn"),
459 const Pair(Namespaces.mathml, "ms"), 458 const Pair(Namespaces.mathml, "ms"),
460 const Pair(Namespaces.mathml, "mtext") 459 const Pair(Namespaces.mathml, "mtext")
461 ]; 460 ];
462 461
463 final spaceCharacters = " \n\r\t\u000C"; 462 const spaceCharacters = " \n\r\t\u000C";
464 463
465 const int NEWLINE = 10; 464 const int NEWLINE = 10;
466 const int RETURN = 13; 465 const int RETURN = 13;
467 466
468 bool isWhitespace(String char) { 467 bool isWhitespace(String char) {
469 if (char == null) return false; 468 if (char == null) return false;
470 return isWhitespaceCC(char.codeUnitAt(0)); 469 return isWhitespaceCC(char.codeUnitAt(0));
471 } 470 }
472 471
473 bool isWhitespaceCC(int charCode) { 472 bool isWhitespaceCC(int charCode) {
474 switch (charCode) { 473 switch (charCode) {
475 case 9: // '\t' 474 case 9: // '\t'
476 case NEWLINE: // '\n' 475 case NEWLINE: // '\n'
477 case 12: // '\f' 476 case 12: // '\f'
478 case RETURN: // '\r' 477 case RETURN: // '\r'
479 case 32: // ' ' 478 case 32: // ' '
480 return true; 479 return true;
481 } 480 }
482 return false; 481 return false;
483 } 482 }
484 483
485 final List<String> tableInsertModeElements = const [ 484 const List<String> tableInsertModeElements = const [
486 "table", 485 "table",
487 "tbody", 486 "tbody",
488 "tfoot", 487 "tfoot",
489 "thead", 488 "thead",
490 "tr" 489 "tr"
491 ]; 490 ];
492 491
493 // TODO(jmesserly): remove these in favor of the test functions 492 // TODO(jmesserly): remove these in favor of the test functions
494 final asciiLetters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 493 const asciiLetters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
495 494
496 final ZERO = 48; 495 const ZERO = 48;
497 final LOWER_A = 97; 496 const LOWER_A = 97;
498 final LOWER_Z = 122; 497 const LOWER_Z = 122;
499 final UPPER_A = 65; 498 const UPPER_A = 65;
500 final UPPER_Z = 90; 499 const UPPER_Z = 90;
501 500
502 bool isLetterOrDigit(String char) => isLetter(char) || isDigit(char); 501 bool isLetterOrDigit(String char) => isLetter(char) || isDigit(char);
503 502
504 // Note: this is intentially ASCII only 503 // Note: this is intentially ASCII only
505 bool isLetter(String char) { 504 bool isLetter(String char) {
506 if (char == null) return false; 505 if (char == null) return false;
507 int cc = char.codeUnitAt(0); 506 int cc = char.codeUnitAt(0);
508 return cc >= LOWER_A && cc <= LOWER_Z || cc >= UPPER_A && cc <= UPPER_Z; 507 return cc >= LOWER_A && cc <= LOWER_Z || cc >= UPPER_A && cc <= UPPER_Z;
509 } 508 }
510 509
(...skipping 24 matching lines...) Expand all
535 var c = text.codeUnitAt(i); 534 var c = text.codeUnitAt(i);
536 if (c >= UPPER_A && c <= UPPER_Z) { 535 if (c >= UPPER_A && c <= UPPER_Z) {
537 c += LOWER_A - UPPER_A; 536 c += LOWER_A - UPPER_A;
538 } 537 }
539 result[i] = c; 538 result[i] = c;
540 } 539 }
541 return new String.fromCharCodes(result); 540 return new String.fromCharCodes(result);
542 } 541 }
543 542
544 // Heading elements need to be ordered 543 // Heading elements need to be ordered
545 final headingElements = const [ 544 const headingElements = const [
546 "h1", 545 "h1",
547 "h2", 546 "h2",
548 "h3", 547 "h3",
549 "h4", 548 "h4",
550 "h5", 549 "h5",
551 "h6" 550 "h6"
552 ]; 551 ];
553 552
554 final cdataElements = const ['title', 'textarea']; 553 const cdataElements = const ['title', 'textarea'];
555 554
556 final rcdataElements = const [ 555 const rcdataElements = const [
557 'style', 556 'style',
558 'script', 557 'script',
559 'xmp', 558 'xmp',
560 'iframe', 559 'iframe',
561 'noembed', 560 'noembed',
562 'noframes', 561 'noframes',
563 'noscript' 562 'noscript'
564 ]; 563 ];
565 564
566 final Map<String, List<String>> booleanAttributes = const { 565 const Map<String, List<String>> booleanAttributes = const {
567 "": const ["irrelevant",], 566 "": const ["irrelevant",],
568 "style": const ["scoped",], 567 "style": const ["scoped",],
569 "img": const ["ismap",], 568 "img": const ["ismap",],
570 "audio": const ["autoplay","controls"], 569 "audio": const ["autoplay","controls"],
571 "video": const ["autoplay","controls"], 570 "video": const ["autoplay","controls"],
572 "script": const ["defer", "async"], 571 "script": const ["defer", "async"],
573 "details": const ["open",], 572 "details": const ["open",],
574 "datagrid": const ["multiple", "disabled"], 573 "datagrid": const ["multiple", "disabled"],
575 "command": const ["hidden", "disabled", "checked", "default"], 574 "command": const ["hidden", "disabled", "checked", "default"],
576 "hr": const ["noshade"], 575 "hr": const ["noshade"],
577 "men": const ["autosubmit",], 576 "men": const ["autosubmit",],
578 "fieldset": const ["disabled", "readonly"], 577 "fieldset": const ["disabled", "readonly"],
579 "option": const ["disabled", "readonly", "selected"], 578 "option": const ["disabled", "readonly", "selected"],
580 "optgroup": const ["disabled", "readonly"], 579 "optgroup": const ["disabled", "readonly"],
581 "button": const ["disabled", "autofocus"], 580 "button": const ["disabled", "autofocus"],
582 "input": const ["disabled", "readonly", "required", "autofocus", "checked", "i smap"], 581 "input": const ["disabled", "readonly", "required", "autofocus", "checked", "i smap"],
583 "select": const ["disabled", "readonly", "autofocus", "multiple"], 582 "select": const ["disabled", "readonly", "autofocus", "multiple"],
584 "output": const ["disabled", "readonly"], 583 "output": const ["disabled", "readonly"],
585 }; 584 };
586 585
587 // entitiesWindows1252 has to be _ordered_ and needs to have an index. It 586 // entitiesWindows1252 has to be _ordered_ and needs to have an index. It
588 // therefore can't be a frozenset. 587 // therefore can't be a frozenset.
589 final List<int> entitiesWindows1252 = const [ 588 const List<int> entitiesWindows1252 = const [
590 8364, // 0x80 0x20AC EURO SIGN 589 8364, // 0x80 0x20AC EURO SIGN
591 65533, // 0x81 UNDEFINED 590 65533, // 0x81 UNDEFINED
592 8218, // 0x82 0x201A SINGLE LOW-9 QUOTATION MARK 591 8218, // 0x82 0x201A SINGLE LOW-9 QUOTATION MARK
593 402, // 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK 592 402, // 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK
594 8222, // 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK 593 8222, // 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK
595 8230, // 0x85 0x2026 HORIZONTAL ELLIPSIS 594 8230, // 0x85 0x2026 HORIZONTAL ELLIPSIS
596 8224, // 0x86 0x2020 DAGGER 595 8224, // 0x86 0x2020 DAGGER
597 8225, // 0x87 0x2021 DOUBLE DAGGER 596 8225, // 0x87 0x2021 DOUBLE DAGGER
598 710, // 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT 597 710, // 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT
599 8240, // 0x89 0x2030 PER MILLE SIGN 598 8240, // 0x89 0x2030 PER MILLE SIGN
(...skipping 14 matching lines...) Expand all
614 732, // 0x98 0x02DC SMALL TILDE 613 732, // 0x98 0x02DC SMALL TILDE
615 8482, // 0x99 0x2122 TRADE MARK SIGN 614 8482, // 0x99 0x2122 TRADE MARK SIGN
616 353, // 0x9A 0x0161 LATIN SMALL LETTER S WITH CARON 615 353, // 0x9A 0x0161 LATIN SMALL LETTER S WITH CARON
617 8250, // 0x9B 0x203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK 616 8250, // 0x9B 0x203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
618 339, // 0x9C 0x0153 LATIN SMALL LIGATURE OE 617 339, // 0x9C 0x0153 LATIN SMALL LIGATURE OE
619 65533, // 0x9D UNDEFINED 618 65533, // 0x9D UNDEFINED
620 382, // 0x9E 0x017E LATIN SMALL LETTER Z WITH CARON 619 382, // 0x9E 0x017E LATIN SMALL LETTER Z WITH CARON
621 376 // 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS 620 376 // 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS
622 ]; 621 ];
623 622
624 final xmlEntities = const ['lt;', 'gt;', 'amp;', 'apos;', 'quot;']; 623 const xmlEntities = const ['lt;', 'gt;', 'amp;', 'apos;', 'quot;'];
625 624
626 final Map<String, String> entities = const { 625 const Map<String, String> entities = const {
627 "AElig": "\xc6", 626 "AElig": "\xc6",
628 "AElig;": "\xc6", 627 "AElig;": "\xc6",
629 "AMP": "&", 628 "AMP": "&",
630 "AMP;": "&", 629 "AMP;": "&",
631 "Aacute": "\xc1", 630 "Aacute": "\xc1",
632 "Aacute;": "\xc1", 631 "Aacute;": "\xc1",
633 "Abreve;": "\u0102", 632 "Abreve;": "\u0102",
634 "Acirc": "\xc2", 633 "Acirc": "\xc2",
635 "Acirc;": "\xc2", 634 "Acirc;": "\xc2",
636 "Acy;": "\u0410", 635 "Acy;": "\u0410",
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2850 "zeta;": "\u03b6", 2849 "zeta;": "\u03b6",
2851 "zfr;": "\u{01d537}", 2850 "zfr;": "\u{01d537}",
2852 "zhcy;": "\u0436", 2851 "zhcy;": "\u0436",
2853 "zigrarr;": "\u21dd", 2852 "zigrarr;": "\u21dd",
2854 "zopf;": "\u{01d56b}", 2853 "zopf;": "\u{01d56b}",
2855 "zscr;": "\u{01d4cf}", 2854 "zscr;": "\u{01d4cf}",
2856 "zwj;": "\u200d", 2855 "zwj;": "\u200d",
2857 "zwnj;": "\u200c", 2856 "zwnj;": "\u200c",
2858 }; 2857 };
2859 2858
2860 Map<int, String> replacementCharacters = (() { 2859 const Map<int, String> replacementCharacters = const {
2861 // TODO(jmesserly): fix this when Dart has literal maps with int keys. 2860 0x00: "\uFFFD",
2862 var r = new Map<int, String>(); 2861 0x0d: "\u000D",
2863 r[0x00] = "\uFFFD"; 2862 0x80: "\u20AC",
2864 r[0x0d] = "\u000D"; 2863 0x81: "\u0081",
2865 r[0x80] = "\u20AC"; 2864 0x82: "\u201A",
2866 r[0x81] = "\u0081"; 2865 0x83: "\u0192",
2867 r[0x81] = "\u0081"; 2866 0x84: "\u201E",
2868 r[0x82] = "\u201A"; 2867 0x85: "\u2026",
2869 r[0x83] = "\u0192"; 2868 0x86: "\u2020",
2870 r[0x84] = "\u201E"; 2869 0x87: "\u2021",
2871 r[0x85] = "\u2026"; 2870 0x88: "\u02C6",
2872 r[0x86] = "\u2020"; 2871 0x89: "\u2030",
2873 r[0x87] = "\u2021"; 2872 0x8A: "\u0160",
2874 r[0x88] = "\u02C6"; 2873 0x8B: "\u2039",
2875 r[0x89] = "\u2030"; 2874 0x8C: "\u0152",
2876 r[0x8A] = "\u0160"; 2875 0x8D: "\u008D",
2877 r[0x8B] = "\u2039"; 2876 0x8E: "\u017D",
2878 r[0x8C] = "\u0152"; 2877 0x8F: "\u008F",
2879 r[0x8D] = "\u008D"; 2878 0x90: "\u0090",
2880 r[0x8E] = "\u017D"; 2879 0x91: "\u2018",
2881 r[0x8F] = "\u008F"; 2880 0x92: "\u2019",
2882 r[0x90] = "\u0090"; 2881 0x93: "\u201C",
2883 r[0x91] = "\u2018"; 2882 0x94: "\u201D",
2884 r[0x92] = "\u2019"; 2883 0x95: "\u2022",
2885 r[0x93] = "\u201C"; 2884 0x96: "\u2013",
2886 r[0x94] = "\u201D"; 2885 0x97: "\u2014",
2887 r[0x95] = "\u2022"; 2886 0x98: "\u02DC",
2888 r[0x96] = "\u2013"; 2887 0x99: "\u2122",
2889 r[0x97] = "\u2014"; 2888 0x9A: "\u0161",
2890 r[0x98] = "\u02DC"; 2889 0x9B: "\u203A",
2891 r[0x99] = "\u2122"; 2890 0x9C: "\u0153",
2892 r[0x9A] = "\u0161"; 2891 0x9D: "\u009D",
2893 r[0x9B] = "\u203A"; 2892 0x9E: "\u017E",
2894 r[0x9C] = "\u0153"; 2893 0x9F: "\u0178"
2895 r[0x9D] = "\u009D"; 2894 };
2896 r[0x9E] = "\u017E";
2897 r[0x9F] = "\u0178";
2898 return r;
2899 })();
2900 2895
2901 final Map<String, String> encodings = const { 2896 const Map<String, String> encodings = const {
2902 '437': 'cp437', 2897 '437': 'cp437',
2903 '850': 'cp850', 2898 '850': 'cp850',
2904 '852': 'cp852', 2899 '852': 'cp852',
2905 '855': 'cp855', 2900 '855': 'cp855',
2906 '857': 'cp857', 2901 '857': 'cp857',
2907 '860': 'cp860', 2902 '860': 'cp860',
2908 '861': 'cp861', 2903 '861': 'cp861',
2909 '862': 'cp862', 2904 '862': 'cp862',
2910 '863': 'cp863', 2905 '863': 'cp863',
2911 '865': 'cp865', 2906 '865': 'cp865',
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 'windows1252': 'cp1252', 3115 'windows1252': 'cp1252',
3121 'windows1253': 'cp1253', 3116 'windows1253': 'cp1253',
3122 'windows1254': 'cp1254', 3117 'windows1254': 'cp1254',
3123 'windows1255': 'cp1255', 3118 'windows1255': 'cp1255',
3124 'windows1256': 'cp1256', 3119 'windows1256': 'cp1256',
3125 'windows1257': 'cp1257', 3120 'windows1257': 'cp1257',
3126 'windows1258': 'cp1258', 3121 'windows1258': 'cp1258',
3127 'windows936': 'gbk', 3122 'windows936': 'gbk',
3128 'x-x-big5': 'big5' 3123 'x-x-big5': 'big5'
3129 }; 3124 };
OLDNEW
« no previous file with comments | « pkg/third_party/html5lib/lib/parser.dart ('k') | pkg/third_party/html5lib/lib/src/encoding_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698