zoukankan      html  css  js  c++  java
  • 简体繁体判断

    Boolean IsBig5(string strOne)
            {
                Boolean bIsBig5 = false;
                byte[] ByteArrayBig5 = System.Text.Encoding.GetEncoding("big5").GetBytes(strOne);
                if (ByteArrayBig5.Length == 2)
                {

                    //check A440~C67E 常用字, C940~F9D5 次常用字    

                    
    //42048~50814, 51520~63957               

                    int iCode = ByteArrayBig5[0] * 256 + ByteArrayBig5[1];
                    if ((iCode >= 42048 && iCode <= 50814) || (iCode >= 51520 && iCode <= 63957))
                    {
                        // chinese char big5    
                        bIsBig5 = true;
                    }
                }
                return bIsBig5;
            }   
  • 相关阅读:
    js禁止空格的输入
    js对cookie的读写操作
    js实现读秒
    formData的简单使用
    图形验证码笔记
    Redis安装
    ZooKeeper安装
    OpenJDK 编译-Linux环境
    Java环境变量-Linux环境
    ArchLinux+Win10双系统的Grub配置
  • 原文地址:https://www.cnblogs.com/hishanghai/p/2609674.html
Copyright © 2011-2022 走看看