轉:https://www.cnblogs.com/renjie0520/p/5242350.html
1.通過sql直接轉換
select CONVERT (*** USING utf8) AS userName from usertable;
2.通過程序轉換(注:本例用的是springmvc包裝並返回結果集)
String srt2;
try {
srt2 = new String((byte[])entry.getValue(),"UTF-8");
hashmap.put(entry.getKey().toString(), srt2);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}