Reputation: 2245
In this msdn post it says Console.WindowWidth is measured in "columns" how many characters fit in one column?
https://msdn.microsoft.com/en-us/library/system.console.windowwidth(v=vs.110).aspx
Upvotes: 1
Views: 290
Reputation: 21
Some characters such as U+0FF0F FULLWIDTH SOLIDUS are two columns wide, e.g. try:
using System.Diagnostics;
// put Console into UTF-8 mode
Process chcp = new Process();
chcp.StartInfo.FileName = "chcp.com";
chcp.StartInfo.Arguments = "65001";
chcp.Start();
chcp.WaitForExit();
char chr = '/'; // U+0FF0F FULLWIDTH SOLIDUS
Console.WriteLine($"1234\na{chr}b"); // / takes two columns
Console.ReadKey();
Upvotes: 0