Re: utf8_unicode_ci collation doesn't work
Posted by: Alexander Barkov
Date: June 08, 2006 04:37AM

I didn't have any problems running this script:

drop table if exists t1;
set names utf8;
create table t1 (
id int not null,
name varchar(64) character set utf8 collate utf8_unicode_ci
) engine=innodb;
insert into t1 values (1, 'Márcio');
insert into t1 values (1, 'Uílton');
select * from t1 where name like 'már%';
+----+---------+
| id | name |
+----+---------+
| 1 | Márcio |
+----+---------+
1 row in set (0.00 sec)

select * from t1 where name like 'mar%';
+----+---------+
| id | name |
+----+---------+
| 1 | Márcio |
+----+---------+
1 row in set (0.00 sec)



How does SHOW CREATE TABLE look like? Probably
your column have another collation.


Also, what does this query return for you:

mysql> select name, hex(name) from t1;
+---------+----------------+
| name | hex(name) |
+---------+----------------+
| Márcio | 4DC3A17263696F |
| Uílton | 55C3AD6C746F6E |
+---------+----------------+
2 rows in set (0.00 sec)


Make sure that you have the same result as I do.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: utf8_unicode_ci collation doesn't work
1648
June 08, 2006 04:37AM


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.