Mysql Insert query charset problem
Posted: Fri Oct 09, 2009 2:12 am
Hello,
I have my SQL server character set Set to UTF-8,
my database character-set set to UTF-8 and
t_statustype table character-set set to UTF-8
I am trying to exequte the following query:
mysql_query ("Insert into t_statustype (f_statustype_name) VALUES ('Предпроектно проучване') ")
After the execution i have "Ïðåäïðîåêòíî ïðîó÷âàíå" value in my db
if i set
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET 'utf8'");
before execution of the query i receive th following error :
" Incorrect string value: '\xCF\xF0\xE5\xE4\xEF\xF0...' for column 'f_statustype_name' at row 1"
If i execute the query from SQL editor it works fine!
Any ideas what might be the problem?
Thank you!
I have my SQL server character set Set to UTF-8,
my database character-set set to UTF-8 and
t_statustype table character-set set to UTF-8
I am trying to exequte the following query:
mysql_query ("Insert into t_statustype (f_statustype_name) VALUES ('Предпроектно проучване') ")
After the execution i have "Ïðåäïðîåêòíî ïðîó÷âàíå" value in my db
if i set
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET 'utf8'");
before execution of the query i receive th following error :
" Incorrect string value: '\xCF\xF0\xE5\xE4\xEF\xF0...' for column 'f_statustype_name' at row 1"
If i execute the query from SQL editor it works fine!
Any ideas what might be the problem?
Thank you!