What type should I be using to store and print these unicode characters? (C++)

Viewed 78

I'm writing a CLI version of the game Snake in C++, and I want to make the snake look cool using different unicode characters to represent different states of the snake. I am using the following characters : ╔, ╗, ╚, ╝, ═, ║, ⩓, ⩔, ⪡, ⪢.

I originally started programming this in Xcode on my Mac, and had no problem what so ever storing them as const char *s.

Image of game running in Xcode on Macos

Running the same code in Visual Studio on Windows, renders much less beautiful results.

Image of game running on Windows (Visual Studio)

Since discovering this, I've been reading all about Unicode and UTF encoding and still do not understand what I should be doing to make these characters to display properly on both Windows and MacOS.

0 Answers
Related