Skip to main content
Topic: Fix unicode query on PDO (Read 2183 times) previous topic - next topic

Fix unicode query on PDO

Hi,
I just test PHPRad output project.It have a problem with unicode data utf8.
In project I already check all utf8 setting.It already set,but data still show ????? in table(I use Thai language).
I investigate in your PDO function and find out to solve problem by SET NAME utf8

I add code in file PDODb.php at line 699 to
Code: [Select]
$this->pdo->query("SET NAMES utf8");

It all fix.
Just to tell other utf8 format have a problem.To solve it,You need to add  SET NAME too.
Tin.

Re: Fix unicode query on PDO

Reply #1
Thanks for the update. Added to our roadmap