I originally wanted to use a file to save several strings, including Chinese character strings. Because it is made of MFC, I naturally want to use the CFile class provided by MFC to file I/O. However, CFile cannot read a record (a string separated by carriage returns. So I switched to the CStdioFile class, but the CStdioFile: WriteString and Readstring do not support Chinese Characters During file IO, or they cannot be written into the file, you cannot read Chinese characters from files. I have tried both the text and binary modes. Text files created by yourself with UNICODE encoding cannot be read normally. It was not done in the middle of the night. I am angry. Therefore, I/O streams of standard files in C ++ are used to access ANSI files. Then convert the ANSI string to the Unicode string. The problem is finally solved. Converts ANSI to Unicode (1) using the L macro. For example, CLSIDFromProgID (L "MAPI. folder ", & clsid); (2) Implement conversion through the MultiByteToWideChar function, for example, char * szProgID =" MAPI. folder "; WCHAR szWideProgID [128]; CLSID clsid; long lLen = substring (CP_ACP, 0, szProgID, strlen (szProgID), szWideProgID, sizeof (szWideProgID )); szWideProgID [lLen] = '\ 0'; (3) implemented through the A2W macro, for example, USES_CONVERSION; CLSIDFromProgID (A2W (szProgID), & clsid ); convert Unicode to ANSI (1) Using WideCharToMultiByte. For example: // assume that a Unicode string wszSomeString is already in use... char szANSIString [MAX_PATH]; WideCharToMultiByte (CP_ACP, signature, wszSomeString,-1, szANSIString, sizeof (szANSIString), NULL, NULL); (2) use the W2A macro, for example: USES_CONVERSION; pTemp = W2A (wszSomeString );