I am trying to print some information in a column-oriented way. Everything works well for Latin characters, but when Chinese characters are printed, the columns stop being aligned. Let's consider an example:
var latinPresentation1 = "some text".PadRight(30) + "| " + 23;
var latinPresentation2 = "some longer text".PadRight(30) + "| " + 23;
Console.WriteLine(latinPresentation1);
Console.WriteLine(latinPresentation2);
Console.WriteLine("..............................................");
var chinesePresentation1 = "一些文字".PadRight(30) + " | " + 23;
var chinesePresentation2 = "一些較長的文字".PadRight(30) + "| " + 23;
Console.WriteLine(chinesePresentation1);
Console.WriteLine(chinesePresentation2);
Output:
some text | 23
some longer text | 23
.................................................
一些文字 | 23
一些較長的文字 | 23
As one can see, the Chinese is not aligned to columns. Important note: this is just a presentation of the problem; it won't be used in a console app. Can anyone help me with this?