![]() |
| UTF-8 form Problem |
|
warrior_deluxe
|
Just reviewed active record. I can't find any charset settings while establishing the connection. Maybe this is the point?
|
||||||||||||
|
|
|||||||||||||
|
johnpipi
|
I looked at the site for MDB2 and found this:
http://oss.backendmedia.com/MDB2/CharacterSet It seems for most RDBMS there is only 1 setting, which sets the client charset. The database charset is determined when the database/table is setup. Its the job of the client-server combination to convert the charsets at some point. This can be set inside an array dsn using the "charset" key. So it looks like you should be able to just add charset = utf8 to your database.ini in Trax as below:
or you can try to do it manually for mysql before you do anything do this: $model = new Model; $model->query("SET NAMES 'utf8'"); $model->find_all(); or whatever you want now. Also maybe make sure everything is utf8 such as: httpd.conf: AddCharset UTF-8 .utf8 AddDefaultCharset UTF-8 php.ini default_charset = "utf-8" my.cnf character-set-server=utf8 default-collation=utf8_unicode_ci and in your layout file: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> another good link i found is: http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html Let me know if how it goes and if it works for you. |
||||||||||||||
|
|
|||||||||||||||
|
andreas_
|
thank you johnpipi, charset = utf8 worked for me to retrieve the utf-8 characters from the db. |
||||||||||||||||
|
|
|||||||||||||||||
| UTF-8 form Problem |
|
||
|
Content © PHPonTrax.com; Powered by phpBB


