解决乱码问题

This commit is contained in:
开源oschina 2022-08-17 09:24:06 +08:00
parent c1998be89c
commit b420a7af9a
1 changed files with 3 additions and 1 deletions

View File

@ -104,11 +104,13 @@ public class GoviewProjectData implements Serializable {
public String getDataToStr() {
byte[] bs= getContent();
String str="二进制转换错误";
try {
/*try {
str = new String(bs, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
*/
str = new String(bs);
return str;
}