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?
Who is Participating?
2266180Connect With a Mentor Commented:
it's 2:35 am here and I was going to bed :) but I'll tell you what functions to try. if you can't make it work, I'll give you tomorrow a working example to convert utf8 to string and back. also put some of those strings you have trouble with in a file and base64 encode it and paste it here so that  I will have some valid data to test with (there are plenty of base63 encoders out there (totalcommander also has built int)

so Utf8ToAnsi and AnsoToUtf8 ar the 2 conversion functions.
considering the output you use, you might need to first convert from unicode to utf8 (or directly to string) using UnicodeToUtf8/Utf8Encode or WideCharToString.
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?
LadinTAuthor Commented:
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

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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 :)
LadinTAuthor Commented:
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.
LadinTAuthor Commented:
It is OK, UTF8decode is my new friend.

Thank You
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.