There are strange characters on fields retrieved from a table of database, however retrieving records using heidi or navicat are shown correctly.
Database is mariadb and collate is utf8_general_ci
What am I doing wrong ?
It sounds like an encoding issue, when retrieving the data, do you define the encoding as utf8 when retrieving the data. Take a look in the xojo manual at Define Encodings and try below to see if you get a better result.
The table schema is
CREATE TABLE `test`.`test` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`NAME` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13640 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
I'm going to be mad.
I created a Mariadb database using utf8 collation. It works fine using encodings every time I read a record from database.
Later, I installed prestashop (mariadb database, utf8 collation) and updated some records from the first mariadb database using a string variable
sql ="UPDATE pso_customer SET name=" + chr(34) + rs.field("name").StringValue + chr(34) + " WHERE " ...
After that, strange characters are shown on prestashop database.
Any ideas ?