Files
serenity/Userland/Libraries/LibTextCodec/Decoder.cpp
Nico Weber b4386a421e LibTextCodec+LibPDF: Find "PDFDocEncoding" only by exact name
get_standardized_encoding() implements a web spec, and it shouldn't
return a value for PDFDocEncoding.

Change the calling code to use decoder_for_exact_name(), which can
still find the decoder by the name "PDFDocEncoding".

(Web contents always goes through decoder_for(), whcih calls
decoder_for_exact_name() only if get_standardized_encoding() returns
a value, so the web can no longer access "PDFDocEncoding", and it's
not meant to.)

See also #24594, especially the fourth commit.

Change the utf-8 and utf-16be code in Document.cpp to use
decoder_for_exact_name() for consistency as well. This part is a no-op.
2025-10-24 21:28:58 -04:00

59 KiB