H
H
HoShik2020-09-24 12:51:12
C++ / C#
HoShik, 2020-09-24 12:51:12

Problem with encoding in Atom (gpp compiler)?

Essence such
There is some program which has conclusions in Russian.
When compiling in the cmd window, all sorts
of bugs Code example:

#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <windows.h>

int main()
{
    setlocale(LC_CTYPE,"Russian");
    SetConsoleCP(1251);
    SetConsoleOutputCP(1251);
    printf("Помоги хабр");
    return 0;
}


The system (Win 10) has UTF-8 support enabled and the file is saved in it
. What's the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HoShik, 2020-09-24
@HoShik

I solved the problem and I want to help those who encountered it:
Go to settings-general and find the item with the choice of encoding for saving files and select Cyrillic (Windows 1251) there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question