From 2db168acc112e8f032d57f8225a8122c0e7f4207 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 17 Feb 2023 20:15:10 +0000 Subject: LibTextCodec+Everywhere: Port Decoders to new Strings --- Userland/Libraries/LibPDF/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibPDF') diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp index c6ade6bac6..4f90d06471 100644 --- a/Userland/Libraries/LibPDF/Parser.cpp +++ b/Userland/Libraries/LibPDF/Parser.cpp @@ -267,7 +267,7 @@ NonnullRefPtr Parser::parse_string() if (unencrypted_string.bytes().starts_with(Array { 0xfe, 0xff })) { // The string is encoded in UTF16-BE - string_object->set_string(TextCodec::decoder_for("utf-16be"sv)->to_utf8(unencrypted_string)); + string_object->set_string(TextCodec::decoder_for("utf-16be"sv)->to_utf8(unencrypted_string).release_value_but_fixme_should_propagate_errors().to_deprecated_string()); } else if (unencrypted_string.bytes().starts_with(Array { 239, 187, 191 })) { // The string is encoded in UTF-8. This is the default anyways, but if these bytes // are explicitly included, we have to trim them -- cgit v1.2.3