mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 22:32:12 +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
|
@ -1419,7 +1419,7 @@ JS_DEFINE_NATIVE_FUNCTION(Window::atob)
|
|||
|
||||
// The bytes object might contain bytes greater than 128, encode them in UTF8
|
||||
// NOTE: Any 8-bit encoding -> utf-8 decoder will work for this
|
||||
auto text_decoder = TextCodec::decoder_for("windows-1252");
|
||||
auto text_decoder = TextCodec::decoder_for("windows-1252"sv);
|
||||
VERIFY(text_decoder);
|
||||
auto text = text_decoder->to_utf8(decoded.release_value());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue