#include <iostream>
#include <io.h>
#include <fcntl.h>
int main() {
_setmode(_fileno(stdout), _O_U16TEXT);
std::wcout << L" test \x263a\x263b Hello World!";
return 0;
}
ATTENTION : Il faut travailler sur un fichier UTF16 dans ce cas
#include <iostream>
#include <io.h>
#include <fcntl.h>
int main() {
_setmode(_fileno(stdout), _O_U16TEXT);
std::wcout << L" test \x263a\x263b Hello World!";
return 0;
}
ATTENTION : Il faut travailler sur un fichier UTF16 dans ce cas