http://hi.baidu.com/linjk03/item/e2028bfd990c14ea1a111feb 统一了输入输出的编码格式,是不会有乱码问题出现的. 构造Reader或Writer时,指定编码格式. in = new BufferedReader(new InputStreamReader(socket.getInputStream(),"UTF-8")); out = new BufferedWriter(new OutputStreamWriter(socke
本文转载地址:http://developer.51cto.com/art/200906/130425.htm 感谢相关作者! MySQL默认编码是latin1 mysql> show variables like 'character%'; +--------------------------+--------------------------+ | Variable_name | Value | +--------------------------+------------------