I want to print the musical flat symbol: ♭
(U+266D) on a console. I use wchar_t
and wprintf()
to do that, but it always prints out ?
instead of ♭
. I tried setmode()
and setlocale()
as well, as you can see down in the code, but neither of them was successful.
int main(){
_setmode(_fileno(stdout), _O_U16TEXT);
//setlocale(LC_ALL, "en_US.UTF-8");
wprintf(L"\u226d");
}