JAVAEE-based-parking-manage.../tingchechang/src/com/Charcode.java

27 lines
418 B
Java
Raw Normal View History

2023-04-26 13:50:08 +00:00
package com;
import java.io.UnsupportedEncodingException;
public class Charcode {
public Charcode(){
}
public String toString(String str){
String text = "";
if(str != null && !"".equals(str)){
try {
text = new String(str.getBytes("ISO-8859-1"),"GB18030");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
return text;
}
}