mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringView
We don't need a full String/DeprecatedString inside this function, so we might as well not force users to create one.
This commit is contained in:
parent
3c8bfa4662
commit
d6075ef5b5
14 changed files with 16 additions and 16 deletions
|
@ -158,7 +158,7 @@ WebIDL::ExceptionOr<DeprecatedString> WorkerGlobalScope::atob(DeprecatedString c
|
|||
|
||||
// 3. Return decodedData.
|
||||
// decode_base64() returns a byte string. LibJS uses UTF-8 for strings. Use Latin1Decoder to convert bytes 128-255 to UTF-8.
|
||||
auto* decoder = TextCodec::decoder_for("windows-1252");
|
||||
auto* decoder = TextCodec::decoder_for("windows-1252"sv);
|
||||
VERIFY(decoder);
|
||||
return decoder->to_utf8(decoded_data.value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue