快捷搜索栏进行搜索,出现乱码问题
参考修改以下内容:
图片中方法代码如下:
//[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