EoF
November 17th, 2007, 03:52 PM
Hello,
for the past few days I've been trying to get an answer to this. How can I open a file that has Unicode characters in its name using ifstream - the filename is stored in a wstring? I can't use MFC so CFile won't do. I did take a look at wifstream, but I got the same problem as regular ifstream, it takes a char* as the file name, not a w_char*.
The only way I can think of is to find the alternate name of the file using FindFirstFileEx/FindNextFile, but this is not good if I have the full path and one of the parent folders contains Unicode characters.
Any help would be greatly appreciated.
for the past few days I've been trying to get an answer to this. How can I open a file that has Unicode characters in its name using ifstream - the filename is stored in a wstring? I can't use MFC so CFile won't do. I did take a look at wifstream, but I got the same problem as regular ifstream, it takes a char* as the file name, not a w_char*.
The only way I can think of is to find the alternate name of the file using FindFirstFileEx/FindNextFile, but this is not good if I have the full path and one of the parent folders contains Unicode characters.
Any help would be greatly appreciated.