OpenJudgeSystem
OpenJudgeSystem copied to clipboard
When user submits code that sets endoding, an IOException is thrown
This code:
class Program
{
static void Main(string[] args)
{
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Console.OutputEncoding = Encoding.UTF8;
}
}
throws
Unhandled Exception: System.IO.IOException: The handle is invalid.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.set_OutputEncoding(Encoding value)
at _05.Bittris.Program.Main(String[] args)
Can be tested with old system on address .../Contest/ViewCode/188896
Expected behaviour?