在我的收藏里有一个讲的不错: http://blog.youkuaiyun.com/longronglin/articles/1399567.aspx contentByte = content.getBytes("gbk");