I'm reading a wstring from .txt file using a while !eof loop:
std::wifstream fileStream(path);
std::wstring input;
while (fileStream.eof() == false) {
getline(fileStream, input);
text += input + L'\n';
}
But when i print it in wcout some characters get turned into other ones. So far č has turned to e(with a backwards comma ontop), ě to i(with a backwards comma ontop) and š to an error character. First i suspected some format issue. But when i write the string to a new .txt file it's completely fine.
Also i'm using _setmode(_fileno(stdout), _O_U8TEXT);
to get wcout to even work.