[Gambas-user] different UTF-8
Busturia Xx
casa.busturia at ...397...
Mon Oct 10 15:43:11 CEST 2016
Hi
When I paint a text in my drawing area I get bad characters. I think that it is because I red that text from mysql.
Mysql use collation UTF8_mb4_unicode_ci and gambas use utf8 general.
I have this code
Dim Rs as result, MyField as string
...
...
MyField=Rs!field_name
Paint.begin(MyDrawingArea)
...
...
Paint.text(MyField)
Paint.end
I could see that MyField value is 'abc 1" but I get "abc " and two bad characters.
I tried without database field
MyField="abc 1"
Paint.begin(MyDrawingArea)
...
...
Paint.text(MyField)
Paint.end
And it works fine, so I think that all the encoding problems above are caused by text being submitted in one character set and viewed in another.
What can I do?
More information about the User
mailing list