views:

116

answers:

2

Is there any way to write Hebrew in the Windows Console?

I tried the following:

Console.OutputEncoding = new UTF8Encoding(false);
Console.WriteLine("\u05D0\u05D1");
Console.ReadLine();

but instead of "אב" it writes some other Unicode character, that're not in the Hebrew ABC.

Any ideas why?

A: 

Correct me if I'm wrong but I don't think the console supports UTF8.

Bloodsplatter
The console supports UTF8.
TTT
Apparently it doesn't (see below).
Bloodsplatter
+2  A: 

If you can call chcp command before your program, you can change the codepage to Hebrew and then your characters will be readable. There is an interesting article about internationalization and windows console here: http://illegalargumentexception.blogspot.com/2009/04/i18n-unicode-at-windows-command-prompt.html

naivists