📄 mygb2312code.java
字号:
/*
* myGB2312code.java
*
* Created on 2007年3月26日, 上午9:55
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package util;
import java.io.*;
/**
*
* @author hyl
*/
public class myGB2312code {
/** Creates a new instance of myGB2312code */
public static String GB2312toUnicode(String s,String charset)throws IOException
{
// byte ba[] = new byte[s.length()];
// for(int i = 0; i< s.length(); i++){
// ba[i] = (byte)s.charAt(i);
// }
// return new String(ba,"GB2312");
String value = new String (s.getBytes(charset),"GB2312");
return value;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -