static int Main(string[] args)
{
if (((IList)args).Contains("-utf8"))
{
using (StreamWriter writer = new StreamWriter(Console.OpenStandardError(), Encoding.UTF8))
{
// leave the byte order mark in its own line and out
writer.WriteLine();
Console.SetError(writer);
return new App().Run(args);
}
}
else
{
return new App().Run(args);
}
}