如何解决回调的乱码问题

2024-11-14 14:02:33
推荐回答(1个)
回答1:

BufferedReader br = new BufferedReader(new InputStreamReader(System.in,"UTF-8"));
System.out.print("请输入学生所在地:");
String location = new String(br.readLine().getBytes("GBK"),"UTF-8");
System.out.println(location);