My default C ++ is ASCII . How can I switch the code page to Unicode so that cout can display characters from this table by their universal names like '\uXXXX' ? Symbols should be displayed in the console.

  • one
    where exactly do you want to display characters? In the environment, in the console, in the application, somewhere else? - Kromster

1 answer 1

Found a solution: it is necessary to work with Unicode characters and strings in the same way as with data like wchar_t , i.e. use wcout instead of cout , prefixing character constants and strings with the prefix L Example: wcout << L"\u00f5\n\n"; - prints the character i with two dots.

  • and why is this quote from the book for the type "C ++ for dummies" - maint