java base64转string 中文乱码

Base64.Decoder decoderCodeVerify = Base64.getDecoder();
String code = "";
try {
    byte[] bytes = decoderCodeVerify.decode(resultData);
   //utf-8中文会乱码换成gbk试试
 code = new String(bytes,"GBK");
}

你可能感兴趣的:(java,html,servlet)