ladybird/Libraries/LibTextCodec
Andreas Kling 45da0e4a0e LibTextCodec: Preserve malformed decoder replacements
Reject UTF-8 second bytes outside the Encoding Standard's per-lead-byte
bounds before consuming the rest of each sequence. This keeps surrogate
and out-of-range sequences from collapsing multiple malformed bytes into
one replacement character.

Also report an odd trailing UTF-16 byte as U+FFFD through the streaming
code point path and route UTF-16 to_utf8() through the same logic. This
keeps lazy and eager script decoding aligned for bytecode cache source
hashes.

Cover the malformed UTF-8 and UTF-16 cases in LibTextCodec, TextDecoder,
and bytecode-cache source decoding tests.
2026-05-18 14:08:22 +02:00
..
CMakeLists.txt LibTextCodec: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Decoder.cpp LibTextCodec: Preserve malformed decoder replacements 2026-05-18 14:08:22 +02:00
Decoder.h LibTextCodec: Allow processing decoded UTF-16 code points 2026-05-18 09:18:35 +02:00
Encoder.cpp LibTextCodec: Update GB18030 for GB18030-2022 and import WPT tests 2026-05-09 11:44:42 +02:00
Encoder.h LibTextEncoder/LibURL: Cleanup includes 2026-02-26 18:31:57 +01:00
Forward.h LibTextCodec: Add streaming decoder 2026-04-29 04:12:44 +02:00
indexes.json LibTextCodec: Update GB18030 for GB18030-2022 and import WPT tests 2026-05-09 11:44:42 +02:00