W
W
Whomai2018-04-02 07:29:52
cmd/bat
Whomai, 2018-04-02 07:29:52

Why Windows cmd does not format Russian and how to fix it?

I’m running in C, the compiler is MinGW, when I want, for example, to display a string in Russian, then it turns out to be rubbish. Why is this happening and how to fix it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2018-04-02
@NeiroNx

The encoding of the string must be correct CP866 or the terminal itself: if in cmd.exe you first write mode con codepage select=1251 and then run the program, then everything will probably be as it should.

D
d-stream, 2018-04-02
@d-stream

chcp /?

Александр Скуснов, 2018-04-02
@AlexSku

А куда выводите строку: в командное окно? Попробуйте вместо cmd запустить powershell.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question