0

When I try to output "ᕦ( ͡° ͜ʖ ͡°)ᕤ" to console it's just a bunch of question marks.

I have tried messing with System.Console.OutputEncoding with no success.

How can I achieve my utmost important goal of printing the "ᕦ( ͡° ͜ʖ ͡°)ᕤ".

Thomas
  • 6,032
  • 6
  • 41
  • 79
  • 1
    Most likely the font for the console does not support those characters. I think you'l have to change the default font used for the console. – Erik Philips Feb 20 '15 at 16:54
  • 1
    Probably has to do with UTF8-characters see http://stackoverflow.com/questions/2062875/show-utf8-characters-in-console – Drifter Feb 20 '15 at 16:57
  • The console is ANSI by default. Making it unicode is a bit tricky, short answer being "don't". You probably don't want it to be *the* windows console, right? Just make a form that looks like the console :D – Luaan Feb 20 '15 at 16:58
  • @Drifter: Nope; this has nothing to do with UTF-8 specifically. It has to do with the font the console uses and unicode in general: [The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)](http://www.joelonsoftware.com/articles/Unicode.html) – RobIII Feb 20 '15 at 17:06

1 Answers1

2

This works reasonably well (as in: the shape is more recognizable):

Console.OutputEncoding = Encoding.Unicode;
Console.WriteLine("ᕦ( ͡° ͜ʖ ͡°)ᕤ");
Console.ReadLine();

But you need to change the console's default font to something like consolas. With font changed to Consolas it looks like:

Screenshot / proof

With the default font it looks like:

Screenshot / proof

And if you change the font but don't set the output encoding it looks like:

Screenshot / proof

The console's default encoding is OEM Multilingual Latin 1; Western European (DOS) e.g. "IBM850" or OEM United States e.g. "IBM437".

However, as suggested in other comments: don't. Just don't. Here's why.

Community
  • 1
  • 1
RobIII
  • 8,488
  • 2
  • 43
  • 93