mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibTextCodec: Add ISO-8859-6 decoder
This commit is contained in:
parent
763d904ad5
commit
01c3b8091a
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/01c3b8091a Pull-request: https://github.com/SerenityOS/serenity/pull/24463
@ -72,6 +72,17 @@ SingleByteDecoder s_latin_cyrillic_decoder {{
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
|
||||
0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F,
|
||||
}};
|
||||
// https://encoding.spec.whatwg.org/index-iso-8859-6.txt
|
||||
SingleByteDecoder s_latin_arabic_decoder {{
|
||||
0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F,
|
||||
0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 0x0098, 0x0099, 0x009A, 0x009B, 0x009C, 0x009D, 0x009E, 0x009F,
|
||||
0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x060C, 0x00AD, 0xFFFD, 0xFFFD,
|
||||
0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x061B, 0xFFFD, 0xFFFD, 0xFFFD, 0x061F,
|
||||
0xFFFD, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F,
|
||||
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F,
|
||||
0x0650, 0x0651, 0x0652, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
}};
|
||||
// https://encoding.spec.whatwg.org/index-windows-1250.txt
|
||||
SingleByteDecoder s_centraleurope_decoder {{
|
||||
0x20AC, 0x0081, 0x201A, 0x0083, 0x201E, 0x2026, 0x2020, 0x2021, 0x0088, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179,
|
||||
@ -153,6 +164,8 @@ Optional<Decoder&> decoder_for(StringView a_encoding)
|
||||
return s_latin4_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("iso-8859-5"sv))
|
||||
return s_latin_cyrillic_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("iso-8859-6"sv))
|
||||
return s_latin_arabic_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("windows-1250"sv))
|
||||
return s_centraleurope_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("windows-1255"sv))
|
||||
|
Loading…
Reference in New Issue
Block a user