C++ E8070 invalid multibyte character sequence

C++ E8070 invalid multibyte character sequence

In my case, I got this error using code below:



#include "pch.h"
#include <iostream>
#include <fstream>


int main()
{

	std::ifstream ifs("C:\測_試.txt");
	std::string myStringContent((std::istreambuf_iterator<char>(ifs)),
		(std::istreambuf_iterator<char>()));

	return 0;

}

the problem occurs at "C:\測_試.txt" , and finally I find I forget to escape, after change \ to \\ ,  "C:\\測_試.txt" works!