首页 > 解决方案 > 将日文字符插入到 latin1_swedish_ci 整理的 mysql 表列中

问题描述

日文字符被替换为??? 我不允许更改表/列的排序规则。如何插入这些值?

MariaDB [company]> show full columns from test_table_latin1;
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type        | Collation         | Null | Key | Default | Extra | Privileges                      | Comment |
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
| id    | int(5)      | NULL              | YES  |     | NULL    |       | select,insert,update,references |         |
| data  | varchar(20) | latin1_swedish_ci | YES  |     | NULL    |       | select,insert,update,references |         |
+-------+-------------+-------------------+------+-----+---------+-------+---------------------------------+---------+
2 rows in set (0.00 sec)

MariaDB [company]> insert into test_table_latin1 values (4,'Was sent 検索キーワード - 自然');
Query OK, 1 row affected, 1 warning (0.00 sec)

MariaDB [company]> select * from test_table_latin1 where id=4;
+------+----------------------+
| id   | data                 |
+------+----------------------+
|    4 | Was sent ??????? - ? |
+------+----------------------+
1 row in set (0.00 sec)

标签: mysqlcjk

解决方案



推荐阅读