Set Console.OutputEncoding to UTF-8 only if current encoding is single byte

This commit is contained in:
de4dot 2011-09-28 01:29:17 +02:00
parent 37be012a11
commit 828a69fef7

View File

@ -68,7 +68,8 @@ namespace dumpMethods {
delegate void CallCctor();
static int Main(string[] args) {
try {
Console.OutputEncoding = new UTF8Encoding(false);
if (Console.OutputEncoding.IsSingleByte)
Console.OutputEncoding = new UTF8Encoding(false);
var files = parseCommandLine(args);
if (files.Count != 1)