Ask questions UTF-8 in header/footer (skipping non-ASCII characters) (Again)

I'm opening this issue again (formerly Issue 2002) as I'm still seeing this problem with version 0.12.3 (with patched qt) operating under Red Hat Enterprise Linux 7.3.

In my application, the wicked_pdf gem is being used to drive wkhtmltopdf.

When wicked_pdf passes UTF-8 characters to wkhtmltopdf via the command line, they are being dropped by wkhtmltopdf. In this example, I pass the text "Issued/Issué" as footer text. I can see the accented (UTF-8) footer text ("Issué") being passed in the command line:

"***************[\"/apps/webapps/lts/vendor/bundle/ruby/2.2.0/bin/wkhtmltopdf\", \"-q\", 
\"--encoding\", \"UTF-8\", 
\"--margin-top\", \"25\", 
\"--margin-bottom\", \"15\", 
\"--margin-left\", \"0\", 
\"--margin-right\", \"0\", 
\"--header-spacing\", \"6\", 
\"--footer-center\", \"Issued/Issué: 2019-01-10 11:02\\nPage: [page]/[topage]\", 
\"--footer-font-size\", \"8\", 
\"file:////var/folders/cl/7g4qxvd15jq_fcsvbzwgzxtm0000gn/T/wicked_pdf20190110-8066-ef1jne.html\", \"/var/folders/cl/7g4qxvd15jq_fcsvbzwgzxtm0000gn/T/wicked_pdf_generated_file20190110-8066-umsc0g.pdf\"]***************"

but the resulting PDF continues to be missing the "é" in "Issué" when it appears in the rendered footer.

Red Hat Enterprise Linux Server release 7.3 (Maipo) [apps@vapp02t lts]$ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

[apps@vapp02t lts]$ bundle exec which wkhtmltopdf

[apps@vapp02t lts]$ bundle exec /apps/webapps/lts/vendor/bundle/ruby/2.2.0/bin/wkhtmltopdf --version
wkhtmltopdf 0.12.3 (with patched qt)

Any guidance would be appreciated!


Answer questions ksassnowski

I had the exact same thing happen to me using footer-text. All german umlauts would disappear from the generated pdf.

However, what did work for me, was using footer-html with <meta charset="utf-8"> instead of footer-text. @enwood Might be worth a shot? Doesn't really fix the original error but might be a workaround.

Kai Sassnowski ksassnowski @wycomco Munich, Germany Hi I'm Kai. I live in Munich. I like D&D. I work for @wycomco. I built
Github User Rank List