参考修改以下内容:
图片中方法代码如下:
//[B72]HttpURLConnection garbled code,tiansheng 20230719 -b + private static String getCharset(String type) { + String[] typeArray = type.split(";"); + String charset = "utf-8"; + for (int i = 0; i < typeArray.length; i++) { + if(typeArray[i].contains("charset")){ + String[]tem = typeArray[i].split("="); + charset = tem[1].trim(); + } + } + return charset; + } + //[B72]HttpURLConnection garbled code,tiansheng 20230719 -e 标签:code,String,charset,乱码,快捷,搜索,typeArray From: https://www.cnblogs.com/a-n-yan/p/17587487.html