• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [HELP] Invalid string value on MySQL.
#1
Hey, yall. So i was trying to make some records inside of a MySQL table and i must use special characters (?, ?, ?, ?, etc). The issue is that when i try to insert a new row into the table with that special characters these special characters just returns to me this following error:



Code:
Incorrect string value: '\xE7\xE3o de...'



Note: \xE7 matches to '?' and \xE3 matches to the '?' character.



I've already tried to change my collate and character set on MySQL to utfmb4, utf8, latin1, etc. but nothing works. Also i tried to use mysql_escape_string and also tried to use %e instead of %s when manipulating this string whit the special characters. But nothing seems to change.



Code:
? ? mysql_format(DBConn, Query, 500, "INSERT INTO %s (Data, Registro) VALUES ('%d', '%s')", tableName, timestamp, msg);

? ? mysql_query(DBConn, Query);





Note?: When printing the same format i am using to query, everything shows up fine as expected in the console.
  Reply


Messages In This Thread
[HELP] Invalid string value on MySQL. - by Smyle - 2021-01-16, 12:07 AM

Forum Jump: