1byte char문자와 2byte wide char 문자열 변환
wsprintf의 이용
char sz[10] = "가나다라마"; wsprintf(szw, "%s", sz); |
Windows.h http://msdn.microsoft.com/en-us/library/ms647550(VS.85).aspx |
mbstowcs, wcstombs의 이용
mbstowcs ; <stdlib.h> http://msdn.microsoft.com/en-us/library/k1f9b8cy(VS.80).aspx wcstombs ; http://msdn.microsoft.com/en-us/library/5d7tc9zw(VS.80).aspx |
MultiByteToWideChar, WideCharToMultiByte의 이용
MultiByteToWideChar ; <windows.h> http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx WideCharToMultiByte ; http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx |
CString과 CStringW의 이용
char sz[10] = "가나다라마"; TCHAR szw[10] = L"가나다라마"; //char -> wchar CStringW strw(sz); //wchar -> char CString str(szw); |
USES_CONVERSION, A2W, W2A의 이용
char sz[10] = "가나다라마"; USES_CONVERSION; // wchar -> char |