比如,这些十进制的unicode 简体中文,表示“简体中文”汉字,哪里有转换程序或查询表?

解决方案 »

  1.   

    31616对应的16进制是7b80System.out.println("\u7b80");输出“简”
      

  2.   

    谢谢大家的参与,可能是我的表达没说清楚,我的意思不是指用java如何实现,而是指有没有别人作好的程序,能让我输入“简体中文”,自动输出简体中文我在网上找到一个
    中英文字符编码查询  V1.1
    ——Developed By RainVan,
    输入“简”,输出十六进制的值为“7B80",但是我想要的是十进制的值,也就是说&#31616是我的理想结果,有没有这样的作好的应用程序?
    谢谢!
      

  3.   

    #include <windows.h>
    #include <stdio.h>int main(int argc, char* argv[]){
    int iLen;
    unsigned short * punicode;
    int i;
    if (2 != argc)
    {
    printf("格式错误");
    return -1;
    }

    iLen=MultiByteToWideChar (936, 0, argv[1], -1, NULL,0);

    punicode = (unsigned short *)malloc(iLen * 2 + 1); MultiByteToWideChar(936, 0, argv[1], -1, punicode,iLen);
    for(i = 0; i < iLen-1; i++)
    {
    printf("&#%d;", punicode[i]);
    } free(punicode);
    return 0;
    }
    VC6.0编译通过快给分,哈哈。欢迎来我论坛交流http://www.eob.cn/bbs
      

  4.   

    public class T {
      public static void main(String[] args) {
         if(args.length != 1)
           throws new Exception("arguement is not correct.");
         System.out.println(args[0].charAt(0));
      }
    }