pdf Unicode characters ??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

pdf Unicode characters ??

Post by ddragas »

Hi all

I have problem with pdf Unicode characters.

Curently using http://www.tecnick.com/public/code/cp_d ... p_dp=tcpdf tcpdf class to create pdf on the fly, and here in Croatia we have special characters "čćžšđČĆŽŠĐ".

If I write this characters into script and show it in file created on the fly everything works great, but if I take data from database and show it on created pdf file, I can't see those characters, but I see some other stuff, like squres etc etc ....

In database Collation is set to cp1250_croatian_ci and in lang config file $l['a_meta_charset'] = "windows-1250";


Can somebody help me with this problem?

Why if I hardcode value in variable

$somevariable = "čćžšđČĆŽŠĐ";

and show it

$pdf->Cell(0,10,$somevariable,0,1,'C');

it shows ok, but if I take value from db into variable and show it it doesnt show as it should???

If I echo variable it shows like it is (OK).


please help

regards

ddragas
Rovas
Forum Contributor
Posts: 272
Joined: Mon Aug 21, 2006 7:09 am
Location: Romania

Post by Rovas »

The table from where you extract the data is set to cp1250_croatian_ci (sometimes the database has a collation and the table another it happened to me on MySQL 4)?
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Post by ddragas »

Thank you

I've slved problem

regards
Post Reply