Hello. It seems like the code you posted outputs the right bytes , but there is some layer of MSYS2 that is doing extra interpretation on it using out-of-band metadata to figure out what characters you really wanted to print on the screen. I don't understand the full story of what is going on here, but I got your code to work by following the advice here:
https://stackoverflow.com/a/19071749/28128 Here is the code that worked for me: #include <stdio.h> #include <windows.h> int main(int argc,char *argv[]) { SetConsoleOutputCP(65001); printf("Привет, Мир !\n"); printf("Hello, World ! \n"); } --David On Wed, Jul 8, 2020 at 10:03 AM Il'dar Al'Miev <ialm...@yandex.ru> wrote: > Dear All, > hello, > > Windows 7 (64-bit), Msys2-Mingw64 are installed in my computer. > > i wrote very little code in C to display Russian/Cyrillic characters. > however it does not work. i still get some strange pseudo-symbols instead > of correct Russian words (charactres). > > i would appreciate if someone in the forum could assist me to resolve the > issues associated with locating (locale, setlocale) the ANSII-coding of > Latin (English), and Cyrillic (Russian) symbols in terms of gcc-compiler in > Msys2-Mingw64. > > Thank you. > > Il'dar > > ------------------------- > #include<stdio.h> > #include<stdlib.h> > #include<locale.h> > > int main(int argc,char *argv[]) > { > setlocale(LC_ALL,"Rus"); > > printf("Привет, Мир !\n"); > printf("Hello, World ! \n"); > > return 0; > } > --------------------------------------- > > > > > _______________________________________________ > Msys2-users mailing list > Msys2-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/msys2-users >
_______________________________________________ Msys2-users mailing list Msys2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/msys2-users