Re: Japanese voiced and unvoiced characters
Posted by: Ryusuke Kajiyama
Date: May 04, 2021 06:59PM

utf8mb4_ja_0900_as_cs is working as expected.

mysqlsh > CREATE TABLE t0 (
-> col1 VARCHAR(32) COLLATE utf8mb4_unicode_ci,
-> col2 VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_ja_0900_as_cs
-> );
Query OK, 0 rows affected (0.0049 sec)

mysqlsh > INSERT INTO t0 VALUES ('きす', 'きす'),('きず', 'きず');
Query OK, 2 rows affected (0.0023 sec)

Records: 2 Duplicates: 0 Warnings: 0

# Using column with utf8mb4_unicode_ci
mysqlsh > SELECT * FROM t0 WHERE col1 = 'きす';
+------+------+
| col1 | col2 |
+------+------+
| きす | きす |
| きず | きず |
+------+------+
2 rows in set (0.0004 sec)

# Using column with utf8mb4_ja_0900_as_cs
mysqlsh > SELECT * FROM t0 WHERE col2 = 'きす';
+------+------+
| col1 | col2 |
+------+------+
| きす | きす |
+------+------+
1 row in set (0.0006 sec)

utf8mb4_bin or utf8mb4_ja_0900_as_cs is recommended depending on whether you differ Hiragana and Katakana.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Japanese voiced and unvoiced characters
352
May 04, 2021 06:59PM


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.