Can't insert chinese chars into mysql table correctly...

ahwong

Member
Licensed User
Longtime User
I have a mysql table with a column for storing chinese names. The names are inserted and displayed correctly using php scripts...

something like this:
mysql_query("SET NAMES utf8");
$sql = "insert into tbl ..blah blah blah.....
mysql_query($sql);

However if I tried to use B4A to insert the names, I got garbage in the column...
.....
SQL ="insert ....."
ExecuteRemoteQuery(SQL, 999)
....
Sub ExecuteRemoteQuery(Query As String, TaskId As Int)
Dim req As HttpRequest
req.InitializePost2("http://abc.com/android.php", query.GetBytes("UTF8"))
hc.Execute(req, TaskId)
End Sub
'==================================

Everything is ok except the chinese chars..

Any idea?
 
Top