慕粉0001083093
2017-12-25 16:45
怎么在二维码中输入中文,中文生成二维码以后不能正常显示
//注意二维码字节数限制,字节数太多生成的二维码解析会报错
输入中文时 :(与文件编码一致否则进行转编码 new String(str.getBytes(),"utf-8");)
Map hints = new HashMap<>()
hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
解析时:
HashMap hints = new HashMap<>();
hints.put(DecodeHintType.CHARACTER_SET, "utf-8");
Java生成二维码
84569 学习 · 279 问题
相似问题