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

📄 convertchinese.java

📁 功能是公安和学校的管理系统,用struts+hibernate+spring等匡架组成,在eclepse就能编译
💻 JAVA
字号:
package com.comingnet.tool;
import java.io.PrintStream;

public class ConvertChinese
{

    public ConvertChinese()
    {
    }

    public static String toChinese(String strvalue)
    {
        try
        {
            if(strvalue == null || strvalue.equals(""))
            {
                String s = "";
                return s;
            }
            strvalue = new String(strvalue.getBytes("ISO-8859-1"), "gb2312");
            strvalue = strvalue.replace(',', '\uFF0C');
            strvalue = strvalue.replace('\'', '\u2018');
            if(strvalue.substring(0, 1).equals("\""))
                strvalue = "“"+strvalue.substring(1, strvalue.length());
            String s1 = strvalue;
            return s1;
        }
        catch(Exception e)
        {
            String s2 = "";
            return s2;
        }
    }

    public static String toUnicode(String strvalue)
    {
        try
        {
            if(strvalue == null || strvalue.equals(""))
            {
                String s = "";
                return s;
            } else
            {
                String s1 = strvalue;
                return s1;
            }
        }
        catch(Exception e)
        {
            String s2 = "";
            return s2;
        }
    }

    public static void main(String args[])
    {
        System.out.println("hello");
    }
}

⌨️ 快捷键说明

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