Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BillKek/9e10475f07a383d2055ab6415a7a5bb5 to your computer and use it in GitHub Desktop.
Save BillKek/9e10475f07a383d2055ab6415a7a5bb5 to your computer and use it in GitHub Desktop.
utf-8, windows 10, консольное приложение
вместо перевода utf-8 в cp866 при выводе printf просто вызываем функции настройки приложения в main (1 раз) из #include <locale.h>
SetConsoleCP(65001);
SetConsoleOutputCP(65001);
без всякой перенатройки винды, и ваш utf-8 выведется в printf без кракозябр.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment