PHP Classes

DB Character Set

Recommend this page to a friend!

      Ultimate MySQL  >  All threads  >  DB Character Set  >  (Un) Subscribe thread alerts  
Subject:DB Character Set
Summary:Fault handling characters like Chinese, Russian...
Messages:1
Author:Jad Bou Chebl
Date:2010-12-24 09:30:24
 

  1. DB Character Set   Reply   Report abuse  
Picture of Jad Bou Chebl Jad Bou Chebl - 2010-12-24 09:30:41
Hi everyone,

I used to work with ultimate Mysql class during the past 3 years.
Everything went great until i started working on a multi-lingual website.

The problem was with the handling of Chinese, Russian, ... languages.

After debugging the issue, i came over the bug, fixed it and it worked perfectly in my case. Here are the changes i made:

Go to line 1423 in version 2.5.1, and replace:

if (! (mysql_query("SET CHARACTER SET '{$charset}'", $this->mysql_link))) {

by:

if (!mysql_set_charset($charset, $this->mysql_link)) {

Hope this will be useful.