Bug #61258 | Cannot search char 'Đ' via the word 'd' | ||
---|---|---|---|
Submitted: | 22 May 2011 19:26 | Modified: | 23 May 2011 21:20 |
Reporter: | Tung Nguyen | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 5.5.8 | OS: | Any (CentOS) |
Assigned to: | CPU Architecture: | Any | |
Tags: | search utf8, special character |
[22 May 2011 19:26]
Tung Nguyen
[23 May 2011 3:33]
Alexey Kishkin
Hi Tung Nguyen, Which collation do you use for your search column?
[23 May 2011 5:32]
Tung Nguyen
Hi Alexey Kishkin, I use utf8, the same charset with database, table, column. Everything is ok, but only the words contain character 'đ', 'Đ' (If i include character 'd' or 'D' in the search query, it return 0 results. I think you should insert some Vietnamese records and try a search, it's very clearly: id title 1 Anh đã làm gì sai 2 Buồn bã về nhà 3 Đừng nói thế về nhà mày 4 Người Lạ nơi cuối con đường 5 Bọn nó thật tội nghiệp for example: i can search for '%ve nha%' => return id = 2,3 '%nguoi la noi%' => return id = 4 '%nguoi la noi cuoi con duong%' or '%cuoi con duong%' => return 0 result, // it must show id = 4 '%noi the%' => return id = 3 '%dung noi the%' => no result // it must show id = 3 Sorry about my bad English, i hope you can understand my case.
[23 May 2011 13:59]
Peter Gulutzan
This looks like a duplicate of the feature request Bug#4745 Add Vietnamese collation for the ucs2 and utf8 Unicode character sets. If one uses MySQL 5.6 with Vietnamese collation, then 'D' = 'Đ'.
[23 May 2011 14:03]
Valeriy Kravchuk
Duplicate of Bug#4745.
[23 May 2011 21:20]
Tung Nguyen
Hi, It's fortunately for me that you have recently fixed that issue at version 5.6.0 Thanks for your support!
[5 Aug 2011 3:33]
Lam Dinh Ha Ly
This case is very usefull. Thanks Tung Nguyen and MySQL development community.
[3 Jul 2014 20:31]
Nguoi Nha Que
Hello All, I would like to know how MySQL 5.6 supports this problem. I have a schema with utf8_vietnamese_ci as collation and 'd' is not matching 'đ', e.g. 'dong' does NOT match 'đồng'. I have tried different collations, but nothing seems to work. Also SELECT 'd' = 'đ' COLLATE utf8_vietnamese_ci will return 0, which means đ and d are not matching. Please inform me what is the solution. Many thanks.