我得到类似于
0x65e9这样的一个UNICODE码,如何转成我可以在VC的EDIT可以显示的字符?
其原字符是BIG5的 “早”字。UNICODE和可显示的字符之间是什么关系?在DELPHI中可以很方便的显示,在VC中不知道怎么转?

解决方案 »

  1.   

    UINCODE--->GB2312(big5)
    try WideCharToMultiByte() to convert UNICODE to GB2312(big5).
      

  2.   

    could you give me such sample to proceed the convertion?
      

  3.   

    char a[3];
    a[0]=0xe9;
    a[1]=0x65;
    a[3]=NULL;
    ..可以通過WideCharToMultiByte轉換.
    或者直接把你的工程編譯為unicode工程.
    然後上面的char;
    用CString b;
    b.Format(_T("%s"),a);
    AfxMessageBox(b);//應該可以
      

  4.   

    YP2002CN(老婆我不敢了,老婆我愛你) (
    非常感谢你,能告诉我怎么将工程编译为UNICODE工程?
      

  5.   

    add "#define _UNICODE" in stdafx.h
      

  6.   

    these statements can conver unicode "早"(e9 65) to big5 "早"(a6 ad), u must compile and run it under traditional Chinese edition windows
    ------------------------------------------------------
    WCHAR szUin[]=L"早";
    char szBig5[3] = {0};
    int nCount = wcslen(szUin);
    int nSize=0;
    nSize=WideCharToMultiByte(CP_ACP,0, szUin, nCount, NULL,0,NULL,NULL);
    WideCharToMultiByte(CP_ACP,0, szUin, nCount, szBig5, nSize,NULL,NULL);
    MessageBox(szBig5);