char * MbcsToUTF8(const char *file)
{
WCHAR *pwchar = 0;
CHAR *pchar = 0;
int len = 0;
int codePage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
len = MultibytesToWideChar(codePage, 0, -1, NULL, 0);
pwchar = new WCHAR[len];
if(0 != pwchar)
{
len = MultiByteToWideChar(codepage, 0, file, -1, pwchar, len);
if ( 0 != len)
{
len = WTOM(CP_UTF8, .....) // 懒得打了。。。
pchar = new CHAR[len];
WTOM
delete
}
delete
}
return pchar;
}