Unicode-UTF8 and CRecordset
Posted by: Marin Chernyak
Date: May 28, 2006 09:29AM

I didn't find a related problems advice in the previous messages, so I decided to ask, may be somebody knows.
I have no problems to obtain data from MySQL database by CRecordset if I extract whole data, which has encoding UTF-8. For example (SELECT * FROM [people]) . After this no problem to iterate any column and transfer utf-8 strings to Unicode by the function MultiByteToWideChar.
However, I experienced the problem to get a query, using a Unicode fragment like this:
SELECT * FROM [PEOPLE] WHERE Second_Name LIKE ‘Name_written_in_Russian%’
In this case the recordset cannot find a necessary name. I understand that here is the conflict between Unicode and multibite characters, but I have no idea how to resolve it.
- Class derived from CREcordset supports Unicode
- The table people has collation cp1251_general_ci, But some columns ,like Second_name has the collation UTF8-bin
Thanks for any advice.

Options: ReplyQuote

Written By
Unicode-UTF8 and CRecordset
May 28, 2006 09:29AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.