mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibTextCodec: Add ISO-8859-3 decoder
This commit is contained in:
parent
fc783199f1
commit
6c84edaaa2
Notes:
sideshowbarker
2024-07-16 22:34:39 +09:00
Author: https://github.com/skyrising Commit: https://github.com/SerenityOS/serenity/commit/6c84edaaa2 Pull-request: https://github.com/SerenityOS/serenity/pull/24463
@ -39,6 +39,17 @@ SingleByteDecoder s_ibm866_decoder {{
|
||||
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F,
|
||||
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0,
|
||||
}};
|
||||
// https://encoding.spec.whatwg.org/index-iso-8859-3.txt
|
||||
SingleByteDecoder s_latin3_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, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFD, 0x0124, 0x00A7, 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFD, 0x017B,
|
||||
0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, 0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFD, 0x017C,
|
||||
0x00C0, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0x010A, 0x0108, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0xFFFD, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x0120, 0x00D6, 0x00D7, 0x011C, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x016C, 0x015C, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0x010B, 0x0109, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0xFFFD, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9,
|
||||
}};
|
||||
// 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,
|
||||
@ -114,6 +125,8 @@ Optional<Decoder&> decoder_for(StringView a_encoding)
|
||||
return s_ibm866_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("iso-8859-2"sv))
|
||||
return s_latin2_decoder;
|
||||
if (encoding.value().equals_ignoring_ascii_case("iso-8859-3"sv))
|
||||
return s_latin3_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