Avatar of Jeff
Jeff
 asked on

Special characters in a TCPDF

I am pulling a title out of a database "WHAT's NEXT"

Here is the tcpdf cell code: $pdf->MultiCell(0, 0, $SemTitle, 0, 'C', false, 0, 10, 127);

Results on PDF: WHAT'S NEXT?

I have tried
$SemTitle = html_entity_decode($row['EvtTitle']);

$SemTitle = utf8_decode($row['EvtTitle'])

$SemTitle = utf8_encode($row['EvtTitle'])

Not sure if I should be working from the db query or where it is in the ftpdf cell
DatabasesPHP

Avatar of undefined
Last Comment
Jeff

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Brian Tao

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Julian Hansen

Is the data coming out of the DB like that or is it coming out in the PDF only in other words is the DB sending through data that needs to be converted or is it getting mangled as part of the PDF output?
Jeff

ASKER
It is coming out of the db. I had this same problem a year ago and Ray Paseur provided the fix, html_entity_decode, but it isn't working this time. Not sure what has changed. It is so frustrating!
Brian's code is working.
Thanks to both of you for the quick response.
Jeff

ASKER
Interesting:
ENT_COMPAT      Will convert double-quotes and leave single-quotes alone.
ENT_QUOTES      Will convert both double and single quotes.
ENT_NOQUOTES      Will leave both double and single quotes unconverted.
Your help has saved me hundreds of hours of internet surfing.
fblack61