This website requires JavaScript.
Explore
Help
Sign in
dmaax
/
ladybird
Watch
1
Star
0
Fork
You've already forked ladybird
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
master
ladybird
/
Tests
/
LibWeb
/
Text
/
expected
/
Encoding
/
TextDecoder-decode.txt
5 lines
41 B
Text
Raw
Permalink
Normal View
History
Unescape
Escape
LibWeb: Make 'optional BufferSource' IDL arguments actually optional Previously this was compiled to require an object despite the IDL file specifying 'optional'. This commit makes IDLGenerator respect this modifier, and fixes the only affected instance.
2023-05-30 03:18:23 -03:00
[ABC]
[]
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 07:53:22 -03:00
[3, fffd, fffd, fffd]
LibTextCodec: Match UTF-8 replacement handling Consume truncated UTF-8 tails as one malformed sequence while preserving existing behavior for encoded surrogate code points. This keeps lazy SourceCode decoding and bytecode cache source hashing aligned with eager source text decoding for invalid cached script source bytes. Continue stripping an initial UTF-8 byte order mark in UTF8Decoder::to_utf8() so HTML parsing keeps matching the previous String-based implementation. Cover the shared decoder behavior and the TextDecoder API surface.
2026-05-17 20:47:40 -03:00
[1, fffd]
Reference in a new issue
Copy permalink