fstream not opening files with accent marks in pathname
问题 #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, char **argv) { try { ifstream file; string simplePath = "I:/foo.conf"; string markPath = "I:/Folder_à/foo.conf"; file.exceptions(ifstream::failbit | ifstream::badbit | ifstream::eofbit); file.open(simplePath.c_str()); // ok file.open(markPath.c_str()); // exception ios_base::failbit set } catch (ifstream::failure f) { cout << "Exception " << f.what() << endl; return 1; } return 0; } If a file has