Two different emojis are compared as same in mysql5.6.34 with utf8mb4_unicode_ci collation.
Posted by: Vipin Sankhwar
Date: January 22, 2018 04:21AM

Recently we have migrated our DB to utf8mb4 encoding scheme. Using utf8mb4_unicode_ci as default collation.

With that I hit an issue where mysql treats following 2 emojis 😵 and 😝 to be equal.

Is it a bug with this collation or an expected behavior? In either case can someone please get me the details if there are any more such character pairs which treated equal?



Issue Example:

CREATE TABLE `user` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci',
`mail` MEDIUMTEXT NULL COLLATE 'utf8mb4_unicode_ci',
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
AUTO_INCREMENT=9
;

#Create 2 users with name as 😵 and 😝 respectively.
Query: select id from user where name="😵"; # Try to search created user.
Result: Both the users are returned in query this query.

Options: ReplyQuote


Subject
Views
Written By
Posted
Two different emojis are compared as same in mysql5.6.34 with utf8mb4_unicode_ci collation.
1567
January 22, 2018 04:21AM


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.