mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibTextCodec+Everywhere: Port Decoders to new Strings
This commit is contained in:
committed by
Andreas Kling
parent
3c5090e172
commit
2db168acc1
Notes:
sideshowbarker
2024-07-17 00:00:59 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/2db168acc1 Pull-request: https://github.com/SerenityOS/serenity/pull/17511 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/nico
@@ -515,7 +515,7 @@ void HTMLScriptElement::resource_did_load()
|
||||
// we have to re-encode it to UTF-8.
|
||||
if (resource()->has_encoding()) {
|
||||
if (auto codec = TextCodec::decoder_for(resource()->encoding().value()); codec.has_value()) {
|
||||
data = codec->to_utf8(data).to_byte_buffer();
|
||||
data = codec->to_utf8(data).release_value_but_fixme_should_propagate_errors().to_deprecated_string().to_byte_buffer();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user