Hi,

I pull the data from database and print it on screen. How can I print all the characters correctly? Page should support all languages worldwide. English(this is fine anyway), Turkish, Chinese, Greek, French, Tai etc.

I added some header lines, meta tags like UTF-8 etc. but no joy.

Thanks in advance

If I did not misunderstand your meaning, you mean that even the special characters will be remained after loaded from database. If so, please refer this link: http://php.net/manual/en/faq.html.php

Do you mean the mata tags as explained here?
I found meta tags necessary for base 8 ascii characters which by default don't show up in the browser which sometimes can be solved in the following code snippet but you should check the link I provided too.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

Ok guys, I've found out the problem. I am using TCPDF to generate pdf files from html pages outputs. When I echo directly in html file, the output is fine but if I convert the file into pdf by using TCPDF, special chars appear as ? mark. It is to do with TCPDF which doesn't support some languages so I have no choice but trying some other PDF generators.

Member Avatar

I thought TCPDF supported most chars? Any help from TCPDF forum?

commented: Good post :) +12

Perhaps you should consult the TCPDF documentation or if all else fails you can launch a post on their official forums as I'm sure not too many people here will know much about TCPDF here.