Dids Posted October 21, 2009 Share Posted October 21, 2009 Hey all, I noticed that umlauts don't get properly parsed with the PDF invoice. Any idea why? Seems the PDF invoice reads the translation file, which works just fine with everything else. Here's a picture of how the PDF ends up looking: http://kimag.es/share/4007986.png Anyone have a (preferrably quick) solution? :-/ 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted October 26, 2009 Author Share Posted October 26, 2009 Anyone? Still needing a solution for this. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted October 26, 2009 WHMCS Support Manager Share Posted October 26, 2009 I suspect you will need to apply the UTF-8 TCPDF fonts to your installation for these characters to work. You can download these @ http://www.whmcs.com/members/dl.php?type=d&id=37 and then just upload the files from this ZIP to the includes folder of your WHMCS installation. 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted October 26, 2009 Author Share Posted October 26, 2009 Thank you for the reply, though it seems that didn't change a thing. I unzipped the files to the includes folder, overwriting some of the existing files. I wonder if I need to clear a cache of some sort before it'll use the new fonts, or if the fonts are just not the problem here? Might be that TCPDF isn't using UTF-8, or that there's something wrong when converting from the translation file (umlauts) to TCPDF, as it just prints out the values exactly like they are in the locale text file. 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted October 27, 2009 Author Share Posted October 27, 2009 I changed the font to 'freesans' in the default section(s) of the tcpdf.php and invoicepdf.tpl in the portal template folder, still no luck. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 27, 2009 Share Posted October 27, 2009 Is your language file saved to UTF-8 ? 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted October 28, 2009 Author Share Posted October 28, 2009 Not sure exactly what you mean, so I tried to convert the whole file to utf-8. While it looks the same, WHMCS can't read it anymore. If you meant using the letters ä and ö instead of ä and ö I've tried that before (not with the new fonts though) and WHMCS/PHP didn't seem to able to handle the letters. Here's what the PDF looks like if I replace the umlaut-codes with actual letters: http://kimag.es/share/70572165.png It's actually skipping letters, as the first row's supposed to say Päiväys and the second one's Eräpäivä. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 28, 2009 Share Posted October 28, 2009 Yes, I mean the whole language file and it should be none problem to use the characters ä and ö What is the System Charset under General Settings, Localisation ? 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 28, 2009 Share Posted October 28, 2009 One more tips! Try to convert the invoicepdf.tpl to UTF-8 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted October 28, 2009 Author Share Posted October 28, 2009 If I use the characters ä and ä they won't appear correctly (as seen in the screenshot). System charset is set to utf-8. I'll see about converting the .tpl file, though, I don't see how that would do it any good? Thanks for the help though. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 28, 2009 Share Posted October 28, 2009 If you converted the language file to UTF-8 and WHMCS can`t read it, something is wrong, when you convert. I use Norwegian characters and had the same problem. If you PM me, with a link to the language file, I can take a look. 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 30, 2009 Share Posted October 30, 2009 (edited) Do you got my PM? Edited October 30, 2009 by web2008 0 Quote Link to comment Share on other sites More sharing options...
jnet Posted October 30, 2009 Share Posted October 30, 2009 it did not work me either 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted October 30, 2009 Share Posted October 30, 2009 (edited) Can you be more specific? I sent Dids a Finnish language file, converted to utf-8 and it works fine on my install. Edited October 30, 2009 by web2008 0 Quote Link to comment Share on other sites More sharing options...
jnet Posted November 1, 2009 Share Posted November 1, 2009 japanese lang not working 0 Quote Link to comment Share on other sites More sharing options...
Jan Posted March 29, 2010 Share Posted March 29, 2010 Hi, Just thought to post a little info that can help out for those experiencing this. This is done on commandline on *nix box with the file Norwegian.txt as example. Check file info, encoding etc: # file Norwegian.txt Convert the file to UTF-8: # iconv -f ISO-8859-1 -t UTF-8 Norwegian.txt > Norwegian-utf8.txt Check the new file: # file Norwegian-utf8.txt Now copy the file Norwegian-utf8.txt to Norwegian.txt and overwrite the old file. Remember to make sure that you have a backup of the file first. Best regards Jan 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.