Answer the question
In order to leave comments, you need to log in
How to normally change the encoding in Visual Studio?
The problem is this. I write in Russian - when compiling, krakozyabra climbs. I put Cyrillic 866 - everything works fine. I save, close, open, I see this:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!" <<"\n" << "1. dfапЏаЁўҐв" "\n";
cin.ignore();
}
Answer the question
In order to leave comments, you need to log in
Working version for working with UTF-8 strings (2015 studio). Don't forget to resave the source in UTF-8 encoding.
#include <iostream>
#include <windows.h>
int main()
{
SetConsoleOutputCP(CP_UTF8);
auto message = u8"Тест тест";
wprintf(L"%S", message);
return 0;
}
You have some problems with the installed studio. Try reinstalling it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question