I have written the following code, but when I compile and run this program in the console of windows, it doesn't show the characters correctly. What is the problem?
#include <iostream>
auto main(int argc, char* argv[]) -> decltype(0) {
char const u8[]{ u8"Hello, ☃!" };
std::cout << "UTF 8: " << u8 << std::endl;
char16_t const u16[]{ u"Hello, ☃!" };
std::cout << "UTF 16: " << u16 << std::endl;
char32_t const u32[]{ U"Hello, ☃!" };
std::cout << "UTF 32: " << u32 << std::endl;
return 0;
}
Output of the program:
UTF 8: Hello, Γÿâ!
UTF 16: 0053F790
UTF 32: 0053F750