Unicode literal - how does this even make sense?
问题 int main() { std::cout << "\u2654" << std::endl; // Result #1: ♔ std::cout << U'\u2654' << std::endl; // Result #2: 9812 std::cout << U'♔' << std::endl; // Result #3: 9812 return 0; } I am having trouble understanding how Unicode works with C++. Why does not the literal output the literal in the terminal? I kind of want something like this to work; char32_t txt_representation() { return /* Unicode codepoint */; } Note: the source is UTF-8 and so is the terminal, sitting on macOS Sierra, CLion