⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mygb2312code.java

📁 这是和jspcourseware相对应的案例。希望大家通过这个案例的学习能够系统的掌握jsp编程的思想。
💻 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 + -