ladybird/Userland/Libraries/LibTextCodec
Luke Wilde e864444fe3 LibTextCodec/Latin1: Iterate over input string with u8 instead of char
Using char causes bytes equal to or over 0x80 to be treated as a
negative value and produce incorrect results when implicitly casting to
u32.

For example, `atob` in LibWeb uses this decoder to convert non-ASCII
values to UTF-8, but non-ASCII values are >= 0x80 and thus produces
incorrect results in such cases:
```js
Uint8Array.from(atob("u660"), c => c.charCodeAt(0));
```
This used to produce [253, 253, 253] instead of [187, 174, 180].

Required by Cloudflare's IUAM challenges.
2023-02-28 08:46:06 +00:00
..
CMakeLists.txt Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
Decoder.cpp LibTextCodec/Latin1: Iterate over input string with u8 instead of char 2023-02-28 08:46:06 +00:00
Decoder.h LibTextCodec+Everywhere: Port Decoders to new Strings 2023-02-19 17:15:47 +01:00