Re: UTF8 Chinese String Comparison
Posted by: CL Chuah
Date: September 27, 2009 12:37PM

Thks Rick.

I'm using SQLyog to do the test. Actually it was part of bigger project develop in PHP, i extract portion of it.

And yes, I tested using SET NAMES utf8 before, here is test result
set names utf8;
select * from test_utf where CONVERT(a USING gb2312)=CONVERT('飞' USING gb2312); -- return nil
select * from test_utf where a='裎'; -- return nil

if I change it to
set names latin1;
select * from test_utf where CONVERT(a USING gb2312)=CONVERT('飞' USING gb2312); -- return what i want
select * from test_utf where a='裎'; -- return both records

Will try the HEX() and let u know the result.

Options: ReplyQuote


Subject
Views
Written By
Posted
9821
September 25, 2009 01:38PM
3391
September 26, 2009 05:48PM
Re: UTF8 Chinese String Comparison
3101
September 27, 2009 12:37PM
4269
September 27, 2009 05:44PM
3298
September 28, 2009 03:41PM
3511
September 28, 2009 03:49PM
3030
September 28, 2009 11:41PM


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.