Link to home
Start Free TrialLog in
Avatar of LadinT
LadinT

asked on

UTF8 results from Zeos

I need read UTF-8 records from MySQL database using Zeos library (+ TNTstringgrid =unicode stringgrid), but every result looks as ASCII.

Can you tell me, how to set it right?
Avatar of 2266180
2266180
Flag of United States of America image

1) make sure that the fields in mysql tables are of type utf-8
2) how do you read the records? what components do you use? are those components utf-8 (unicode) enabled?
3) how do you pass the records from the components to the zeos components?
Avatar of LadinT
LadinT

ASKER

1) If work with this tables in PHP (some years :-) ), i can write and read it right
2) I use Zeos library, but i don't know if it is Unicode enabled, i think it is. TNTcomponents are unicode enabled.

I have set ZConnection Properties set to codepage=utf8
Non-ASCII character are displayed as two-characters, not as '?'

I only want describe any example with Zeos, where i can see result in UTF-8


I never worked with zeos, but I suggest looking at the way you read the records and saving the output to a file. then you can view the file and see if zeos indeed gets the records correctly. if it does, and tnt doesn't show it right, then you found your problem. if it doesn't read them right, then again you found your problem :)
Avatar of LadinT

ASKER

If i save it to file, it is correct.

Output from zeos is as string only, other characters are displayed as sequence 8-bit chars.  
Can you send me some example for conversion of this string to utf8? Simple conversion is bad, i need convert it as stream... maybe...

I cannot find something useful...

Thank You.
ASKER CERTIFIED SOLUTION
Avatar of 2266180
2266180
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LadinT

ASKER

It is OK, UTF8decode is my new friend.

Thank You