Alex Rivera | Logout

Print ASCII line art characters in C# console application

Asked 2010-12-22T16:09:04.337
18

I would like to have a C# console application print the extended ASCII Codes from http://www.asciitable.com/. In particular I am looking at the line art characters: 169, 170, 179-218. Unfortunately when I tried, I ended up getting 'Ú' for 218 and expect to see the other characters from http://www.csharp411.com/ascii-table/.

I'm aware that ASCII only specifies character codes 0 - 127. I found another post with a reference to SetConsoleOutputCP(), but was not able to get that to work in a C# class or find an example of how to do so.

Is it possible to print the line art characters in a C# console application? If it is can someone provide a URL to an example or the code?

c#
Edit
Report

1 Answer

2

You can simply use Signs from the ASCII-table in windows.

class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("╔═╗");
        Console.WriteLine("╚═╝");
    }
}
answered 2013-07-12T07:56:17.057

Your Answer