用户如何能够在控制台窗口中编写希伯来字符,现在显示问号,这就是我所拥有的:
Encoding hebrewEncoding = Encoding.GetEncoding("Windows-1255");
Console.InputEncoding = Encoding.GetEncoding("Windows-1255");
Console.WriteLine("Write your input:");
string Input = Console.ReadLine();
答案 0 :(得分:1)
首先确保按照此处说明设置注册表:
top_hits
aggregation
运行 - > regedit --rightclick选择新字符串。
之后 试试这个:
//It will display hebrew letter to console
Console.OutputEncoding = new UTF8Encoding();
Console.WriteLine("\u05D0\u05D1");
Console.WriteLine("אריאל");
Console.WriteLine(new string("אריאל".Reverse().ToArray()));
如果您只想输出:
int board[][] = new int[10][10]
答案 1 :(得分:1)
只需将InputEncoding更改为OutputEncoding:
Console.OutputEncoding = Encoding.GetEncoding("Windows-1255");