对,有。
#define _CONVERSION_USES_THREAD_LOCALE
#include
#include
#include
#include
int main()
{
USES_CONVERSION;
_acp = CP_ACP;
char buf[3] = {0};
buf[0] = getchar();
buf[1] = getchar();
wchar_t tmpbuf[2] = {0};
tmpbuf[0] = A2W(buf)[0];
_acp = CP_UTF8;
char utf8buf[4];
strcpy(utf8buf, W2A(tmpbuf));
int i = 0;
while(utf8buf[i] != 0)
{
printf("%02x ", (unsigned char)utf8buf[i]);
++i;
}
return 0;
}
如果不是VC6.0而是新的VC的话是新的写法。
你可以输入一个日进去看看