Re: Dont know how to make SQL search for the column 'varchar' and collation 'utf8_unicode_ci'. Been spending more than a week. pls help
Posted by: Rick James
Date: July 06, 2010 10:28PM

Works for me...
mysql> SELECT HEX(CText), asciiValue FROM `8888n8866`;
+------------+------------+
| HEX(CText) | asciiValue |
+------------+------------+
| EFBCA1     | EFBCA1     |
| EFBD81     | EFBD81     |
| C481       | C481       |
| C3A1       | C3A1       |
| C78E       | C78E       |
| C3A0       | C3A0       |
+------------+------------+
6 rows in set (0.00 sec)

mysql> SELECT HEX(CText), asciiValue, CText FROM `8888n8866` WHERE CText="A";
+------------+------------+-------+
| HEX(CText) | asciiValue | CText |
+------------+------------+-------+
| EFBCA1     | EFBCA1     | ?     |
| EFBD81     | EFBD81     | ?     |
| C481       | C481       | ?     |
| C3A1       | C3A1       | á     |
| C78E       | C78E       | ?     |
| C3A0       | C3A0       | à     |
+------------+------------+-------+
6 rows in set (0.00 sec)

The first query is to make sure I have the data stored correctly. The last one shows that the WHERE clause is "utf8_unicode_ci". (I assume that all 6 rows _should_ match "A".) No Chinese character will (I believe) match CText = "A".

If that does not answer you question, please _rephrase_ the question.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Dont know how to make SQL search for the column 'varchar' and collation 'utf8_unicode_ci'. Been spending more than a week. pls help
1847
July 06, 2010 10:28PM


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.