It's good! Thank you! But I should change the file charset to...

Recommend this page to a friend!

      Data Dictionary  >  All threads  >  It's good! Thank you! But I should...  >  (Un) Subscribe thread alerts  
Subject:It's good! Thank you! But I should...
Summary:Package rating comment
Messages:2
Author:JerryPan
Date:2011-06-21 08:21:33
Update:2011-06-21 16:29:38
 

JerryPan rated this package as follows:

Utility: Good
Consistency: Good
Documentation: Good
Examples: Good

  1. It's good! Thank you! But I should...   Reply   Report abuse  
JerryPan - 2011-06-21 08:21:33
It's good! Thank you! But I should change the file charset to UTF8 . And add 3 line code ,let the db-class support utf8. I use Chinese in db comments.

  2. Re: It's good! Thank you! But I should...   Reply   Report abuse  
Sylvia Sotomayor - 2011-06-21 16:29:39 - In reply to message 1 from JerryPan
That is a good idea. I believe that one can add ';charset=UTF-8' to the connect string for most databases, like so:

line 14 of DataDictionary.class.php:
$connect = $dsn . ':host=' . $host . ';dbname=' . $dbase . ';charset=UTF-8';

For MySQL only, this also works added after line 18 of DataDictionary.class.php:
//set character set
$dbh->exec("SET CHARACTER SET utf8");

I will change the DataDictionary.class.php file to reflect the first solution.

 

For more information send a message to info at phpclasses dot org.