|
I don't know why, but just adding
SetConsoleOutputCP(CP_UTF8);
doesn't quite work -- or rather, it works when a new console is
opened fresh for Lua (e.g if you double-click lua.exe from Windows
Explorer), but fails if you run lua from an existing console (by
"fails" I mean that 3 garbage characters are printed instead of the
snowman, indicating that the OEM codepage is being used instead
of UTF-8).