babynus wrote: If "é" is encoded woth 4 bytes in your database, then it is not in UTF8, but UTF16.
This may explain your issues.
I can confirm that with parameters as described in this post, caracters are correctly stored (this works fine in Demo / Track databases)
No, no, no and no, sorry !
Please read carefully given explanations. I said : « the single character "é" is registered with 4 (four !) bytes,
as “é” UTF8-coded »
The four bytes are the two UTF-8 codes (2+2=4) for à and ©, nothing to do with an other system (and 4 bytes for true « é » would be UTF-32, not UTF-16(*) !)
So I confirm that storage is wrong !!!
(*) UTF-16 store all characters on 2 bytes, included ASCII, but can't store Unicode characters beyond Uxffff.
To be entirely clear:
hex values for "é":
in ANSI : E9
in UTF-8 : C3A9 (= ANSI string for "é") That's what I should have as stored string.
in UTF-16 : 00E9
in UTF-32 : 000000E9
hex values for "é"
in ANSI : C3A9
in UTF-8 : C385C2A9 <= I've THIS as stored string !!!!!
in UTF-16 : 00C300A9