Archivée comes out as Archivée.
Patate sucrée (French for sweet potatoe) comes out as patate sucrée.

I'm using entity_print-7.x-1.4+5-dev
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | entity-type-accents-not-printed-properly-2718427-24.patch | 1.06 KB | bisonbleu |
| #20 | 2718427-20.patch | 914 bytes | jordanpagewhite |
| #19 | entity_print.install.txt | 1019 bytes | bisonbleu |
| #15 | entity_print2718427-15.patch | 377 bytes | jordanpagewhite |
| #8 | 2718427-8.patch | 399 bytes | benjy |
Comments
Comment #2
bisonbleu commentedInserting image
Comment #3
bisonbleu commentedAnnotated image.
Comment #4
benjy commentedUn-tested but can you try the attached patch?
Comment #5
bisonbleu commentedHey @benjy. Patch applies cleanly. No changes though. Still seeing Archivée and sucrée.
Comment #6
benjy commentedI'm unable to reproduce locally on the Drupal 8 version, I don't have the D7 version setup right now. Try the following patch instead and make sure you clear the cache first and don't have that template overridden in your theme or anything.
Comment #7
bisonbleu commentedNope, no cigars yet ;-) No changes.
The context, although I don't think it matters, is Commerce Kickstart 2 /Omega sub-theme. I also tried with Bartik.
Comment #8
benjy commentedI messed the patch up sorry, try this one.
Comment #9
bisonbleu commentedNo luck.
Reverted last patch
Applied new patch
drush cc all
Tried as admin in FF
Tried as authenticated in Chrome
Comment #10
benjy commentedHmm, not sure what else it could be and I can't reproduce it on the D8 version. Maybe you can propose a fix?
Comment #11
bisonbleu commentedI've installed and tested entity_print in a vanilla D7. Same problem with accents. I'm in the process of pushing this to a Pantheon test environment. This raises the issue of how to install wkhtmltopdf. More on this soon I hope.
Cheers
Comment #12
bisonbleu commentedUpdate.
I installed entity_print on a vanilla D7 on Pantheon.io and accents are broken in the PDF for Article nodes.
I'm not sure what more I can do.
Comment #13
bisonbleu commentedSetting back to active as well as major since, without support for accents, the module is broken for a lot of folks.
Comment #14
jordanpagewhite commentedI can also confirm this issue. I will review the code when I return from lunch because I also would like to use this module.
Comment #15
jordanpagewhite commentedAdding a meta tag with charset="utf-8" fixed the issue for me. Please test it and let me know if it solves your issue. Thanks.
Comment #16
bisonbleu commentedThanks @jordanpagewhite, your patch fixes this issue AND, upon further review, @benjy's patch in #8 also fixes this issue - apologies.
So here's what's happening. In a vanilla D7 install patches in #8 and #15 fix the broken accents issue. This applies to 7.x-1.4 and 7.x-1.x-dev.
But copy the exact same code to a Commerce Kickstart 2 (CK2) install and it doesn't work - i.e. the accents remain broken. So it is fair to assume that CK2 is preventing the new entity-print.tpl.php from doing its job.
Any idea how I can solve this, where I should look?
p.s. While uninstalling, I found a bug in entity_print.install. Line 23 reads
$rid_permissions = [];I believe that should be$rid_permissions = '';right ?Comment #17
benjy commentedLine 23 reads
$rid_permissions = array();for me which is correct.Comment #18
benjy commentedNot sure about the Commerce Kickstart issue, if someone wants to take a closer look at that in the next few days we can fix it here as well otherwise i'll go ahead commit this issue.
Comment #19
bisonbleu commentedAttached, the entity_print.install from 7.x-1.x-dev
Line 22 and 23
p.s. I'll report that in a new issue.
Comment #20
jordanpagewhite commentedGive this a shot
Comment #22
benjy commentedO, of course the commerce order sub-module has a different template, bit of something extra in that patch but updating the other template should fix it.
Comment #23
bisonbleu commentedYes, adding
<meta charset="utf-8">toentity-print--commerce-order.tpl.phpfixes the broken accents issue in Commerce Kickstart. Thanks guys!One last question. I have seen variants for this fix across different templates. Is there a definitive/best-practice one ?
Variation #1
Variation #2
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">Variation #3
<meta charset="utf-8">Let me know and I'll create the patch.
Comment #24
bisonbleu commentedAfter further investigation, it appears Variation #3 or
<meta charset="utf-8">is all that is required.The attached patch adds this meta tag where it was missing (entity-print.tpl.php and entity-print--commerce-order.tpl.php).
Also, since entity_type requires PHP 5.4, I added this dependency in the .info file of the module. [Update: as of 2015-12-13, the PHP 5.4 dependency has been removed].Comment #25
jordanpagewhite commentedThat's a great question. I looked around and it seems like the shorter version, #3, is both easier to remember and the preferred HTML5 method. Good to know! Ha. You learn something everyday.
Comment #26
jordanpagewhite commentedAlso, I'm setting this to 'Needs review'.
Comment #27
jordanpagewhite commentedCan you elaborate on the PHP 5.4 requirement? Otherwise, I am fine to move to RTBC.
Comment #28
benjy commented@bisonbleu this module does not have a requirement on PHP5.4, the syntax errors you reported were fixed months ago, I presume you just need to upgrade to the latest version.
Comment #30
benjy commentedThanks, committed #24.