2011-05-02 38 views
2

这工作UTF8MySQL的输出十六进制的字符串作为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 é而不是é

回答

相关问题