utf problem with html form |
![]() ![]() |
utf problem with html form |
Nov 3 2009, 10:18 PM
Post
#1
|
|
|
Advanced Member ![]() ![]() ![]() Group: Members Posts: 8,266 Joined: 23-November 08 Member No.: 6,521 |
over a week i am reading articles about utf8 and how to be compatible with php and mysql, however i didn't solve my problem. :confused:
my problem is: when I send data using normal html form to mysql database, this data appear like : ???????????. wrong characters. although my database encoding is utf-8 as its tables. and I have meta tag in the page which said that charset=utf-8 ... may be usefull to know , i am using PDO to connect to mysql. and smarty to deal with templates. PHP Code: // Create a new PDO class instance self::$_mHandler = new PDO(PDO_DSN, DB_USERNAME, DB_PASSWORD, array( PDO::ATTR_PERSISTENT => DB_PERSISTENCY)); self::$_mHandler->query('SET NAMES utf8'); |
|
|
|
![]() ![]() ![]() |
|
Lo-Fi Version | Time is now: 12th March 2010 - 11:39 PM |