big5轉unicode是用MultiByteToWideChar
char *str = "big5轉unicode.txt";
wchar_t wcbuf[32];
MultiByteToWideChar (950,0,str,-1,wcbuf,32);
unique轉big5是用WideCharToMultiByte
wchar_t *wstr = L"unicode轉big5";
char mbcsbuf[32];
WideCharToMultiByte(950 ,0,wstr,-1,mbcsbuf,32,NULL,NULL);
記得要#include<Windows.h>
沒有留言:
張貼留言