Are you sure that the literal character is using ASCII?
char a = 'á';
char b = char(160);
std::cout<< a <<" == "<< std::char_traits<char>().to_int_type(a) <<'\n';
std::cout<< b <<" == "<< std::char_traits<char>().to_int_type(b) <<'\n';
My guess is that your text editor is using Unicode for printed characters (where the value of 'á' is 0x00E1), and the problem is your assumption of extended ASCII between the text editor and the C++ runtime.