Results 1 to 4 of 4
Thread: Queries not saving UFT-8 chars
Sep 15, 2012, 05:32 #1
- Join Date
- Jan 2005
- 0 Post(s)
- 0 Thread(s)
Queries not saving UFT-8 chars
I'm running a php script to populate a mysql table from a txt file.
My db table is set to utf-8.
I run the php vis ssh and echo the queries and sure enough it's telling me each insert has the non-ascii chars.
But when I check the db table, it seems to be bailing that field at the non-ascii chacter:
INSERT INTO cities VALUES('','ad','Aixàs')
Should be: Aixàs
i've been trying all sorts and nothing works. I've tried setting some stuff just after connection in the php:
mysql_query("SET NAMES UTF8", $con);
mysql_query("SET character_set_results=utf8", $con);
mysql_query("SET character_set_client=utf8", $con);
mysql_query("SET character_set_connection=utf8", $con);
Any ideas most appreciated?