这个可以使用UTF8
create temporary table test (x char(1) not null) charset=utf8;
insert into test select x'c3a9';
select hex(x), x from test;
drop table test;
输出
+--------+---+
| hex(x) | x |
+--------+---+
| C3A9 | é |
+--------+---+
但是这使用的是默认字符集,而不是 utf8
SELECT x'c3a9';
我该如何修改上述一行代码,以便输出UTF-8编码的字符 é
而不是 é
?