The simplest code, displays "?????". What is the problem? The same garbage with some programs on the computer, what is the problem and how to fix it?

#include <iostream> #include <Windows.h> using namespace std; int main() { setlocale(LC_ALL, "Russian"); cout <<"Дароу"<<endl; return 0; } 
  • So show this code. / Which language is installed in the system for non-unicode programs? - Alexander Petrov
  • Code added to the header. - ImmRaytal
  • what, sorry, language ?? - ImmRaytal
  • one
    Control Panel> Region> Administrative> Language for non-Unicode programs. tyts - Alexander Petrov
  • one
    The file was converted to UTF-8 without a BOM? Looks like no. - And

2 answers 2

Try to set the properties of the console Lucida Console

enter image description here

  • answered above, the problem was not this - ImmRaytal

Control Panel> Region> Administrative> Language for non-Unicode program and change to Russian

option on Russian Windows:

Control Panel> Clock, Language and Region> Regional Standards (Region)> Advanced> Change system language .. and change to Russian

Reboot ..

That helped me, thanks to all for the answers.

  • On the rights of whining ... Anyone who uses non-unicode encodings in their programs should be excommunicated. - Alexander Petrov
  • I did not understand you. - ImmRaytal
  • Always and everywhere use unicode. In particular, wstring , wchar , wcout , wcin . Because otherwise, your programs will be displayed correctly only on those machines where the system language corresponds to yours. On others there will be cracks. - Alexander Petrov
  • are they analog strings, char, cout, cin? - ImmRaytal
  • Yes. w - from wide - wide character. Roughly speaking, unicode. - Alexander Petrov