You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, if the project metadata (title, author, subject, ...) contain characters not supported or not well mapped by the system 8 bit codepage, then the metadata of the PDF file exported from the print layout (using the "Export RDF metadata" option) are wrongly encoded.
Project metadata with the string Test Eλληνικά Русский ÀÇÑ ŞÖÜ ŁĞÇŞ
Metadata of the exported PDF with the wrongly encoded string Test E??????? ??????? ÀÇÑ SÖÜ LGÇS
Describe the bug
On Windows, if the project metadata (title, author, subject, ...) contain characters not supported or not well mapped by the system 8 bit codepage, then the metadata of the PDF file exported from the print layout (using the "Export RDF metadata" option) are wrongly encoded.
Project metadata with the string Test Eλληνικά Русский ÀÇÑ ŞÖÜ ŁĞÇŞ
Metadata of the exported PDF with the wrongly encoded string Test E??????? ??????? ÀÇÑ SÖÜ LGÇS
Test project
Test_project.zip
QGIS and OS versions
QGIS 3.10.x, 3.16.x, 3.17-master
Windows 7 / 10, windows-1252 system codepage
Additional context
The issue doesn't occur if the print layout is exported as GeoPDF instead of PDF: this previously unreported issue was fixed for GeoPDF with #40156
I think the issue is due to the use of QString::toLocal8Bit() instead of QString::toUtf8() in
QGIS/src/core/qgsmaprenderertask.cpp
Lines 348 to 364 in 3b4e360
QGIS/src/core/layout/qgslayoutexporter.cpp
Lines 1596 to 1612 in 3b4e360
The text was updated successfully, but these errors were encountered: