Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 characters not properly "handled" in PDF packing slip. #11

Open
lat9 opened this issue Jun 11, 2015 · 3 comments
Open

UTF-8 characters not properly "handled" in PDF packing slip. #11

lat9 opened this issue Jun 11, 2015 · 3 comments

Comments

@lat9
Copy link

lat9 commented Jun 11, 2015

A Swedish client has expressed a desire to use this plugin (downloaded from the master branch on 2015-06-11). The site (Zen Cart v1.5.1, currently) has both the database (DB_CHARSET) and displayed (CHARSET) set for utf-8 characters.

When I print a PDF packing slip, the non-ASCII characters are garbled e.g.

Posten / DHL ServicePoint (Brev: Skickas med Posten till din brevlåda. Paket: Hämtas på närmaste utlämningsställe.

gets output as:

pdf_packing_slip

I haven't had a chance to investigate yet; just wanted to make sure the report is out there!

@lat9
Copy link
Author

lat9 commented Jun 11, 2015

Based on the suggestion in this link (http://stackoverflow.com/questions/6334134/fpdf-utf-8-encoding-how-to), edit /YOUR_ADMIN/includes/classes/fpdf/fpdf.php starting at line 645:

if($txt!=='')
{

//-bof-20150611-lat9-Convert any UTF-8 characters for the print-out
if (CHARSET == 'utf-8') {
$txt = iconv('utf-8', 'cp1252', $txt);
}
//-eof-20150611-lat9
if($align=='R')

@DivaVocals
Copy link
Owner

Thanks Cindy.. I'll make the change.. TRUTHFULLY the FPDF library needs to be updated.. I've tried to do this before, but was unsuccessful.. :(

@lat9
Copy link
Author

lat9 commented Jun 12, 2015

From the little bit I read on the UTF-8 "issue", it wouldn't be corrected by going to an updated version, anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants