chinese.java
来自「该代码是一个销售管理系统的源代码」· Java 代码 · 共 33 行
JAVA
33 行
package com.tool;
import java.io.UnsupportedEncodingException;
public class Chinese {
public static String toChinese(String strvalue) {
try {
if (strvalue == null) {
return "";
}
else {
strvalue = new String(strvalue.getBytes("ISO8859_1"), "GBK");
return strvalue;
}
}
catch (Exception e) {
return "";
}
}
public static String str(String a) {
try {
return new String(a.getBytes("ISO-8859-1"));
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return null;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?