I know this is solved, but for future reference, if none of the above work, this is what worked for me:
#include <windows.h>
int main (){
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
setvbuf(stdout, NULL, _IONBF, 0);
}