Tuesday, February 14, 2012

special character like " not showing properly in pdf


I using html2fpdf library to generate a pdf in codeigniter .I have some data in a varchar field like " What are your child’s academic strengths? " which is showing like " What are your child’s academic strengths? " .



How I can show it as it is in the database .(I have tried htmlspecialchars_decode , html_entity_decode function but it not worked. )

1 comment:

  1. The problem maybe in retrieval,insertion of data from/to mysql using php
    You need to set the charset before saving stuff to db or reading them back.

    mysql_set_charset('utf8');


    See UTF8, PHP and MySQL

    ReplyDelete