Support

Home Forums Translations umlauts not working in invoice

umlauts not working in invoice

Posted: January 30, 2014 at 3:22 am


Frank Gresslin

January 30, 2014 at 3:22 am

Hi,

I just scanned through this forum and saw other – now closed but unresolved – threads that report the same problem I am having with umlauts in the invoice PDFs. How can this be fixed? Unfortunately the same problem still exists in 3.1.36.4.P and upgrading makes my event(s) inaccessible. So I do need a patch for event-espresso.3.1.16-RC1 that I am using.

If it helps, it seems that the umlaut problem only occurs on street and city strings in the customer address, the customer name is fine (see sample invoice below). So these 2 strings seem to be processed differently??

Thanks!
Frank

Sample Invoice

p.s. I am still running WP 3.6, event-espresso.3.1.16-RC1, no add-ons, no upgrades performed


Sidney Harrell

January 30, 2014 at 10:53 am

In the invoice/template.php file, where it says:

$attendee_address != '' ? $pdf->Cell(100, 5, $attendee_address, 0, 1, 'L') : '';

which is line 141 in the current version, change it to:

$attendee_address != '' ? $pdf->Cell(100, 5, pdftext($attendee_address), 0, 1, 'L') : '';


Frank Gresslin

January 30, 2014 at 11:46 am

Thanks Sidney!! – that did the trick.

Since in Germany the ‘zip’ comes in front of the City I modified your code a bit further and changed it to this – in case someone else has the same issue:

<pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”>$attendee_address != '' ? $pdf->Cell(100, 5, pdftext($attendee_address), 0, 1, 'L') : '';
$pdf->Cell(100,5,( ( $attendee_zip != '' ? $attendee_zip :'' ) . ' ' . pdftext( $attendee_city != '' ? $attendee_city :'' ) ),0,1,'L');
$attendee_state != '' ? $pdf->Cell(50,5, pdftext($attendee_state) ,0,1,'L') :'';


Frank Gresslin

January 30, 2014 at 11:47 am

seems there is a bug in code highlighting – here is the code again without any pre wrap:

$attendee_address != ” ? $pdf->Cell(100, 5, pdftext($attendee_address), 0, 1, ‘L’) : ”;
$pdf->Cell(100,5,( ( $attendee_zip != ” ? $attendee_zip :” ) . ‘ ‘ . pdftext( $attendee_city != ” ? $attendee_city :” ) ),0,1,’L’);
$attendee_state != ” ? $pdf->Cell(50,5, pdftext($attendee_state) ,0,1,’L’) :”;

The support post ‘umlauts not working in invoice’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso