String str = URLEncoder.encode("中国","utf-8");
System.out.println(str);
//解码
String str1=URLDecoder.decode(str, "UTF-8");
System.out.println(str1);

打印结果

%E4%B8%AD%E5%9B%BD
中国

相关文章:

  • 2021-11-29
  • 2022-01-21
  • 2021-10-09
猜你喜欢
  • 2022-02-22
  • 2022-12-23
  • 2021-09-20
  • 2021-05-23
  • 2021-09-02
  • 2022-12-23
  • 2021-07-27
相关资源
相似解决方案