且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将MySQL查询的输出转换为utf8

更新时间:2023-09-11 21:39:34

您可以使用CAST和CONVERT在不同类型的编码之间进行切换.参见: http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html

You can use CAST and CONVERT to switch between different types of encodings. See: http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html

SELECT column1, CONVERT(column2 USING utf8)
FROM my_table 
WHERE my_condition;