[개발/VC++] MultibyteToUTF8, UTF8ToMultibyte
출처 : 인터넷 [utf8.h] #ifndef UTF8_H #define UTF8_H int MultibyteToUTF8(const char* src,int nbyte,char** dest); int UNICODE_encode(const char* src,int bytelen,unsigned short** unicode); int UTF8_encode(const unsigned short* src,int srclen,char** multibyte); int UTF8ToMultibyte(const char* src,int nbyte,char** dest); int UNICODE_decode(const unsigned short* src,int srclen,char** multibyte); int UTF8_..
2011. 2. 21.
[개발/VC++] API를 이용한 ASCII와 UNICODE변환및 코드페이지를 이용한 변환방법
출처 : 인터넷 API를 이용한 ASCII와 UNICODE변환및 코드페이지를 이용한 변환방법 [사용예제] // 멀티바이트문자열 --> 와이드문자열 char chText[100] = "abcdefg"; // 멀티바이트 문자열 wchar_t* pszTmp = NULL; // 와이드만자열로 변경해서 저장될 주소 int iLen = ::MultiByteToWideChar(CP_ACP, 0, pszText, -1, pszTmp, 0); pszTmp = new wchar_t[iLen+1]; ::MultiByteToWideChar(CP_ACP, 0, pszText, -1, pszTmp, iLen); wchar_t tcResult[MAX_PATH] = _T(""); wcscpy( tcResult, pszTmp ); d..
2011. 2. 17.