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.
- onewhere exactly do you want to display characters? In the environment, in the console, in the application, somewhere else? - Kromster
- Look here: ru.stackoverflow.com/a/459299/10105 - VladD
|
1 answer
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
|