-2

I'm trying to make a xy program which prints ASCII art in the console with characters such as , when running the program just prints question marks (?). I understand that it's 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 fix the issue, it would be much appreciated.

What I have  wrote what vs recognizes it as

1
  • 1
    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? Commented Dec 19, 2020 at 3:31

2 Answers 2

0

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:

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.