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
10346
September 25, 2009 01:38PM
3585
September 26, 2009 05:48PM
Re: UTF8 Chinese String Comparison
3245
September 27, 2009 12:37PM
4454
September 27, 2009 05:44PM
3493
September 28, 2009 03:41PM
3718
September 28, 2009 03:49PM
3216
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.