📄 chineseutils.java
字号:
package utils;
/**
* @author lixiaoqing
*
*/
public class ChineseUtils {
/**
* 从数据库读出数据时的编码转换
* @param chi 输入字符串
* @return 转换后的字符串
*/
public static String transToEn(String chi)
{
String result = null;
byte temp[];
try
{
temp = chi.getBytes("iso-8859-1");
result = new String(temp);
}
catch(Exception e)
{
}
return result;
}
public static String transToCh(String chi)
{
String result = null;
byte temp[];
try
{
temp = chi.getBytes("gb2312");
result = new String(temp);
}
catch(Exception e)
{
}
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -