编码乱码问题
// 文件读取时,需要设置编码格式
BufferedReader reader = new BufferedReader(new InputStreamReader(ps.getInputStream(), Charset.forName("GBK")));
// 转换编码格式
System.out.println(new String("你好".getBytes(StandardCharsets.UTF_8)));
System.out.println(new String("你好".getBytes(Charset.forName("GBK"))));
System.out.println(new String("你好".getBytes(Charset.forName("GBK")), StandardCharsets.UTF_8));
System.out.println(new String("浣犲ソ".getBytes(StandardCharsets.UTF_8)));
System.out.println(new String("浣犲ソ".getBytes(Charset.forName("GBK"))));
System.out.println(new String("浣犲ソ".getBytes(Charset.forName("GBK")), StandardCharsets.UTF_8));