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

📄 transcode.java

📁 用户登录,增加,删除,修改,查询数据库,验证码的使用
💻 JAVA
字号:
package com.hanb.log.tool;

/*
 * Author :moonzhao
 *
 *处理码制转换的类
 *中文是乱码的时候,通过toChinese()方法转换成汉字;
 */
public class TransCode {
    public TransCode(){

    }

    public String toChinese(String ss) {
        //处理中文问题,实现编码转换
        if (ss != null) {
            try {
                String temp_p = ss;
                byte[] temp_t = temp_p.getBytes("ISO8859-1");
                ss = new String(temp_t,"GB2312");
            } catch (Exception e) {
                System.err.println("toChinese exception:" + e.getMessage());
                System.err.println("The String is:" + ss);
            }
        }
        return ss;
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -