Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2013 19:33
What would you like to do?
[C] How to write Russian characters to Windows console
// Tested on Windows 7 X86-64 with MinGW-w64 GCC.
#include <windows.h>
#include <locale.h>
#include <wchar.h>
// Make sure you have Lucida Console or Consolas font installed and choose it as the console font.
// Set the specified system locale to 'Russian_Russia.1251'.
setlocale(LC_ALL, "Russian");
// Set CP1251 instead of default CP866 to output Cyrillic text.
// In most cases the trick should do the job. No warranty though: it's Windows, baby.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment