java中怎么把utf-8编码的字符串转成汉字

2024-12-28 02:06:25
推荐回答(1个)
回答1:

String str = new String("暗示大家".getBytes(),"UTF-8");
重新用utf-8编码

或者用
URLDecoder.decode("xxxxxx", "UTF-8");重新用utf-8解码