Re: mysql_query/mysql_real_query containing unicode
Posted by: Eidetic Hans
Date: October 15, 2011 02:27PM

In case anyone's curious or comes across this in the future: you have to convert the unicode strings (wstring/wchar_t*) to unicode code points. wcstombs didn't work in my case but I found this code that does work: deanlee.cn/programming/convert-unicode-to-utf8


You can manually insert the code points also for testing, such as changing this:

select * from table where column like '%дом%'

to this:

select * from table where column like '%\xD0\xB4\xD0\xBE\xD0\xBC%'

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: mysql_query/mysql_real_query containing unicode
2825
October 15, 2011 02:27PM


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.