For example, if I write:
cout << "Привет!" << endl; //it's hello in Russian
in console it would be something like "╧ЁштхЄ!"
ok, I know that we can use:
setlocale(LC_ALL, "Russian");
but after that not working command line arguments in russian (if I start my program through BAT file):
StartProgram.bat
chcp 1251
MyProgram.exe -user=Олег -password=Пароль
so, after setlocale program can't read russian arguments properly.
This happens because BAT file in CP1251, but console is in CP866
So, there is a question:
How to write in C++ console russian text and same time russian command line arguments have to be read properly
thanks