French symbols in utf8

[quote=189680:@Eli Ott]Send SET NAMES utf8; to the MySQL server after connecting. What you are receiving is probably encoded in Latin-1. Then you can use recSet.field(“Prenom”).StringValue.DefineEncoding(Encodings.UTF8).

The alternative is to use: recSet.field(“Prenom”).StringValue.DefineEncoding(Encodings.ISOLatin1).ConvertEncoding(Encodings.UTF8).[/quote]

Hello Eli,

Unfortunately no help, i did that already and i get something like :

SELECT id FROM contact WHERE firstname = "Agla?©" AND lastname = "AGN?àS" so even more twisted.

i guess the encoding it is not ISOLatin1, its either something else or there is an issue on the encoding from the beginning, the funny part is that on the databases i get the correct data, but on the query it gets that way, or not, it seems that once i put that [code]rdvBase.SQLExecute("set character set utf8")[/code] after the connect i get AGN Agla so wherever its the special character it gets cut, on the other hand if i don`t put the rdvBase.SQLExecute("set character set utf8") i get the correct name in the database but still same strange characters in the query.

What are the exact byte values you get back from the database? And what do expect to get back?

Hello guys,

So the software that i`m working on has 2 options, standalone (sqlite database) and client-server (mysql server database), both of them are connecting to a mysql server to get and to put some data there . Reviewing the original code i found out that :

When searching for that record on local standalone (sqlite) the query data is taken as StringValue
When searching for that record on local server mode (mysql server) the query data is converted to UTF8

IF the above search is 0 then it will be added a new record :

on local (sqlite) it is added as ISOLatin1from an UTF8 record
on server mode (mysql server) is added as a ISOLatin1 from an UTF8 record

So on the remote db so far the new records are always added as ISOLatin1 as far as i see,

Now when getting the data from the remote server all the data is retrieved as UTF8, and here in the past they were facing duplication data and strange characters.

So far lets say i put all the code to use UTF8, what i do with the existent data that was added as ISOLatin1 ? is there a way to scan the whole db and to re-encode the data from ISOLatin1 to UTF8 ? in this way all the data will be the same ? so far i dont have any record of which data is UTF8 and which is Latin1, just to use some code to detect the data, maybe that`s why when i put db.SQLExecute("set character set utf8") i get errors in parsing because some data it is not utf8 but it is forced to come as utf8 and it creates conflicts.

So far the app works ok for normal names, but once i add special characters like and so on, it keeps creating duplicates and messing the data .

so my point is to detect the wrong encoding , to convert to UTF8 and to save it as UTF8 and to keep using only UTF8 in all the data.