void ReadUnicodeFile3() { FILE* fp; wchar_t utf[1000] = {0}; wchar_t *p = utf; char ansi[2000] = {0}; fp = _wfopen(L"C://Documents and Settings//Administrator//桌面//test.txt", L"rb"); while(!feof(fp)) fread(p++, 1, 2, fp); *--p = L'/0'; fclose(fp); // utf+1剔除UTf-16标记 WideCharToMultiByte(CP_ACP, 0, utf + 1, -1, ansi, sizeof(ansi), NULL, NULL); puts(ansi); }