public class Convert {
public static String convert(String string) {
String s = "";
try {
s = new String(string.getBytes("iso-8859-1"), "GBK");
}
catch (Exception ex) {
System.out.println("字符串处理异常");
}
return s;
}
}
可以转成中文你试试看能不能用
public static String convert(String string) {
String s = "";
try {
s = new String(string.getBytes("iso-8859-1"), "GBK");
}
catch (Exception ex) {
System.out.println("字符串处理异常");
}
return s;
}
}
可以转成中文你试试看能不能用
String fileDesc = dlctrl.getDisposition() + "; filename=\"" + new String(distName.getBytes("MS932"),"iso8859-1") + "\"" ;
res.setHeader( "Content-Disposition", fileDesc );
我也用过
s = new String(string.getBytes("iso-8859-1"), "shift_jis");
但是还是不行
.net中使用httpUtility.UrlEncode(filename).replace("+"," ");
但长文件名师肯定不行的
微软大现在也没有解决