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.
Subject
Views
Written By
Posted
10590
September 25, 2009 01:38PM
3687
September 26, 2009 05:48PM
Re: UTF8 Chinese String Comparison
3326
September 27, 2009 12:37PM
4557
September 27, 2009 05:44PM
3578
September 28, 2009 03:41PM
3823
September 28, 2009 03:49PM
3300
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.