sdext/source/pdfimport/wrapper/wrapper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 7bf563ff458f4bea85284beae4db071137948360 Author: Dr. David Alan Gilbert <d...@treblig.org> AuthorDate: Thu Apr 10 21:47:40 2025 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue Apr 22 04:39:35 2025 +0200 sdext,pdfimport: Fix password encoding on plain PDF import Use ISO_8859_1 rather than UTF8. Found on the 'encrypted_hello_world_r2.pdf' in the PDFium source. Fixes: 2bbe15a2cea2 ("tdf#55425 sdext,pdfimport: Replace checkEncryption") Change-Id: If69c897235352fd0133306004094edf9f9765020 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183994 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 842cfd715d4c..461681439be4 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -1099,7 +1099,7 @@ bool xpdf_ImportFromFile(const OUString& rURL, { OStringBuffer aBuf(256); // Password lines are Pmypassword followed by "O " to try to open - aBuf = "P" + OUStringToOString(aPwd, RTL_TEXTENCODING_UTF8) + " O "; + aBuf = "P" + OUStringToOString(aPwd, RTL_TEXTENCODING_ISO_8859_1) + " O "; osl_writeFile(pIn, aBuf.getStr(), sal_uInt64(aBuf.getLength()), &nWritten);