can any one tell / show me how interacting with libmysql.dll using mysql.pas mysql 5.7 and Delphi 7 and working with utf8? example of code is appreciated? thanx (English is my third language and i cannot speak English very well)
Asked
Active
Viewed 652 times
-3
-
What did you try so far ? – Etsitpab Nioliv Feb 20 '17 at 12:56
-
for j := 0 to mysql_num_fields(myRES) - 1 do begin aStr := aStr +' '+ myROW^[j] ; end; Memo2.Lines.Add( aStr ) ; end; end; //resultat on Memo2.Lines.Add( aStr ) ; 1 â´° A 2 â´° A 3 â´° A 4 â´° A 5 â´° A – youssef Amari Feb 20 '17 at 13:20
-
i have on database a table content a multi language data encoded with utf 8 – youssef Amari Feb 20 '17 at 13:28
-
I wrote a libmysql.dll wrapper myself [here](https://github.com/stijnsanders/DataLank/blob/master/LibMy.pas) – Stijn Sanders Feb 20 '17 at 22:13
-
thank you @stijn-sanders, i well give it a try – youssef Amari Feb 20 '17 at 22:31
-
Please [edit] your question so that the title is descriptive of the problem you're having or question you're asking. All you've done is repeated the information already in the tags and added the word *example*. Your title should be clear enough to have meaning and relevance to future readers who see it in a search result. Thanks – Ken White Feb 21 '17 at 00:55
-
If you were hoping to get the Tafinagh letter YA (`ⴰ`), then you have "Mojibake". – Rick James Feb 21 '17 at 01:10
-
yes @rick james that is correct but how do i use "mojibake" if it is tool or fix it if it is a problem , am trying to get a multi language data : Arabic French Japanese ..... – youssef Amari Feb 21 '17 at 06:48
1 Answers
0
Read here and look for "Mojibake".
- The bytes to be stored need to be UTF-8-encoded. Fix this.
- The connection when INSERTing and SELECTing text needs to specify utf8 or utf8mb4. Fix this.
- The column needs to be declared
CHARACTER SET utf8
(or utf8mb4). Fix this. - HTML should start with
<meta charset=UTF-8>
.
Then, depending what situation you have, fixing the data needs one of the actions here.
Arabic, French, and Japanese can all be handled by utf8.

Community
- 1
- 1

Rick James
- 135,179
- 13
- 127
- 222