--- np2/wince/oemtext.cpp 2004/06/21 02:01:33 1.1 +++ np2/wince/oemtext.cpp 2005/02/12 12:14:00 1.2 @@ -1,7 +1,11 @@ #include "compiler.h" +#include "oemtext.h" -#if defined(OSLANG_UTF8) -UINT oemtext_sjis2oem(char *dst, UINT dcnt, const char *src, UINT scnt) { +#if defined(UNICODE) && defined(OSLANG_UTF8) + +#include "codecnv.h" + +UINT oemtext_sjistooem(char *dst, UINT dcnt, const char *src, UINT scnt) { UINT leng; UINT16 *ucs2; @@ -18,12 +22,12 @@ UINT oemtext_sjis2oem(char *dst, UINT dc return(0); } MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src, -1, ucs2, leng); - ret = ucscnv_ucs2toutf8(dst, dcnt, ucs2, leng); + ret = codecnv_ucs2toutf8(dst, dcnt, ucs2, leng); _MFREE(ucs2); return(ret); } -UINT oemtext_oem2sjis(char *dst, UINT dcnt, const char *src, UINT scnt) { +UINT oemtext_oemtosjis(char *dst, UINT dcnt, const char *src, UINT scnt) { UINT leng; UINT16 *ucs2; @@ -31,7 +35,7 @@ UINT oemtext_oem2sjis(char *dst, UINT dc (void)scnt; - leng = ucscnv_utf8toucs2(NULL, 0, src, (UINT)-1); + leng = codecnv_utf8toucs2(NULL, 0, src, (UINT)-1); if (leng == 0) { return(0); } @@ -39,11 +43,10 @@ UINT oemtext_oem2sjis(char *dst, UINT dc if (ucs2 == NULL) { return(0); } - ucscnv_utf8toucs2(ucs2, leng, src, (UINT)-1); + codecnv_utf8toucs2(ucs2, leng, src, (UINT)-1); ret = WideCharToMultiByte(CP_ACP, 0, ucs2, leng, dst, dcnt, NULL, NULL); _MFREE(ucs2); return(ret); - } #endif