From c63971403a61089904f9d57250b823b6426e13d3 Mon Sep 17 00:00:00 2001 From: Mingun Date: Wed, 27 Sep 2023 23:04:05 +0500 Subject: [PATCH] Regenerate ISO-8859-8-I.xml due to error in its content CDATA section was formed incorrectly and instead was recognized as a Start tag. File introduced in PR #465 and was made manually and not using generator, because WHATWG does not have definition of this encoding as a separate entry in index.json. Actually, this encoding the same as ISO-8859-8, but influences layout direction when render text. Wikipedia: The WHATWG Encoding Standard used by HTML5 treats ISO-8859-8 and ISO-8859-8-I as distinct encodings with the same mapping due to influence on the layout direction So generator was fixed and file regenerated --- test-gen/src/main.rs | 9 +++++++ tests/documents/encoding/ISO-8859-8-I.xml | 29 ++++++++++++----------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/test-gen/src/main.rs b/test-gen/src/main.rs index 65b77d7d..92a1e89f 100644 --- a/test-gen/src/main.rs +++ b/test-gen/src/main.rs @@ -284,6 +284,15 @@ fn main() { .expect(&format!("label `{}` is unsupported", label)); process_index(enc, &codepoints); + if enc == ISO_8859_8 { + // ISO_8859_8_I does not have its own index in encoding/indexes.json, + // but it have the same mapping as ISO_8859_8. + // + // Wikipedia (https://en.wikipedia.org/wiki/ISO-8859-8-I): + // The WHATWG Encoding Standard used by HTML5 treats ISO-8859-8 and ISO-8859-8-I + // as distinct encodings with the same mapping due to influence on the layout direction + process_index(ISO_8859_8_I, &codepoints); + } } // https://encoding.spec.whatwg.org/#x-user-defined-decoder make_xml(X_USER_DEFINED, '\u{F780}'..='\u{F7FF}'); diff --git a/tests/documents/encoding/ISO-8859-8-I.xml b/tests/documents/encoding/ISO-8859-8-I.xml index af5aadbb..9ee16eef 100644 --- a/tests/documents/encoding/ISO-8859-8-I.xml +++ b/tests/documents/encoding/ISO-8859-8-I.xml @@ -1,16 +1,17 @@ - - + + - - -  -  !"#$%'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ - - <[[CDATA[[ -  !"#$%'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]]> + + + + !"#$%'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ + + ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]]> \ No newline at end of file