mckaymultimedia Posted February 20, 2011 Share Posted February 20, 2011 I am having a problem when generating a PDF of an Invoice by clicking the Invoice text while an order is open. The currency symbol in the PDF that is generated is incorrect. In the attached image you will see the result I am getting. Where the currency symbol should be, this appears "₱". The currency symbol I am using is the Philippine Peso "₱". The peso symbol is a Unicode symbol U+20B1. I suspect that may be part of the conflict. The Philippine Peso symbol displays correctly through out the entire site. The only exception in this problem with the PDF Invoice. I have racked my brain and done endless searches and tried some fixes but nothing seems to work. I beleive the problem can somehow be resolved by modifying the ../classes/PDF.php but the fixes I have found on here so far do not have the desired result. I would want the Peso symbol to display but that very least I would accept that there be no symbol at all if that is what it takes. Any assistance in how to accomplish this would be greatly appreciated. 1 Link to comment Share on other sites More sharing options...
Radu Posted February 20, 2011 Share Posted February 20, 2011 have you tried to force the encoding with utf-8 encode/utf-8 decode in classes/PDF.php? on the php.net website there is another function for taking care of the encoding: function _convert($content) { if(!mb_check_encoding($content, 'UTF-8') OR !($content === mb_convert_encoding(mb_convert_encoding($content, 'UTF-32', 'UTF-8' ), 'UTF-8', 'UTF-32'))) { $content = mb_convert_encoding($content, 'UTF-8'); if (mb_check_encoding($content, 'UTF-8')) { // log('Converted to UTF-8'); } else { // log('Could not converted to UTF-8'); } } return $content; } Link to comment Share on other sites More sharing options...
Recommended Posts