Member Avatar for iamthwee

This is driving me mad, I'm sure I'm missing something.

I save the £ sign into the database and it displays fine when I check the database, but when I print this out in a pdf it displays as £.

I can't use modify headers because I'm previewing a pdf in the chrome web browser.

Any ideas would be great!!!

Recommended Answers

All 3 Replies

Member Avatar for iamthwee

Ok it looks like I solved this using:

$varivalue = iconv('UTF-8', 'windows-1252', $varivalue);

Leaving this open in case anyone has some more ideas.

Member Avatar for diafol

DB charset and collation is?
Can't send header you say?

header('Content-Type: text/html; charset=utf-8');
Member Avatar for iamthwee

Thanks Diafol,I know that would resolve it but I'm outputting a pdf straight to the browser, so I can't specify the header type.

In any case the solution above seems to have solved it. I checked in the db and it was saving it correctly.



Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.