https://bugs.documentfoundation.org/show_bug.cgi?id=160289
Bug ID: 160289 Summary: Converting ANSI encoded CSV file to PDF via command line results in replacing special characters (trademark:™,®) with the special question mark symbol:� Product: LibreOffice Version: 7.5.0.1 rc Hardware: All OS: Windows (All) Status: UNCONFIRMED Severity: normal Priority: medium Component: Printing and PDF export Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: yaroslav.mo...@gmail.com Description: When attempting to convert an ANSI-encoded CSV file to PDF via the command line using LibreOffice, special characters such as ™ and ® are replaced with question marks � in the resulting PDF file. The command used for conversion is as follows: 'soffice.exe --headless --convert-to pdf "D:\MyCsvFile.csv" --outdir "D:\conversionResults"' This issue does not occur when opening the same file using the LibreOffice GUI and subsequently exporting it to PDF via Calc. Furthermore, saving the CSV file in UTF-8 encoding using Notepad++ allows for successful conversion via the command line, preserving all original content. To work around the issue, specifying the ANSI encoding with the flag --infilter="CSV:44,34,ANSI" in the command line enables successful conversion of ANSI-encoded files to PDF. >From these observations, it appears that there may be a problem with identifying the encoding of the source file when it is loaded for conversion using the command line interface. Additionally, it's worth noting that this issue is reproducible in all stable releases following version 7.4.7.2. Steps to Reproduce: 1. Create a .csv file that contains special characters such as ™ and ® and save it using ANSI encoding. Or take the .csv file from the attachments. 2. Install any of the affected versions of LibreOffice (any starting from 7.5.0.1 to 7.6.6). 3. Convert the csv file to PDF using the following command line, replacing paths as necessary: 'soffice.exe --headless --convert-to pdf "D:\MyCsvFile.csv" --outdir "D:\conversionResults"'. 4. Inspect the result PDF document. Actual Results: Special characters such as ™ and ® from the source file are replaced with question marks � in the result PDF file. Expected Results: All the content from the original file is preserved in the resulting PDF document without any unwanted replacements. All special characters should be kept. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.6.5.2 (X86_64) / LibreOffice Community Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded -- You are receiving this mail because: You are the assignee for the bug.