-3

I'm trying to make a xy program which prints ASCII art in the console with chracters such as , when running the program just prints question marks (?). I understand that its either because of me using the wrong encoding or Microsoft Visual Studio not having the dictionary of these ASCII Characters. If you have any idea on how to either change encoding or fixing the isue ,it would be much appreciated

What i have  wrote what vs recognizes it as

ZeroTwoWaifu
  • 55
  • 1
  • 6
  • What is the encoding of your file? What is the code page of your console? What code are you using to write? How do you write your characters in the code? Those informations are essential to know why your output does not match your expectation. **Do you really expect to get help when you don't even make the effort to show your code?** – Phil1970 Dec 19 '20 at 03:31

2 Answers2

1

Possible solutions:

  • Try to change the source file encoding to UTF-8 without signature or UTF-8 with signature.
  • Try to use wchar_t literal, i.e. std::wcout << L"Your String";.

Learn more:

Sprite
  • 3,222
  • 1
  • 12
  • 29
1

There is not a problem with your code but rather a problem with the console that shows your output. It does not show unicode character correctly. In order for it to show these characters correctly it need to recognize unicode and use a font that actually have those characters. To verify this, simple open a cmd window and copy/paste the character into it and see what heppens.

kdcode
  • 524
  • 2
  • 7