From 37be012a1197653a85c3c20aa494546cf3294f48 Mon Sep 17 00:00:00 2001 From: de4dot Date: Wed, 28 Sep 2011 01:27:46 +0200 Subject: [PATCH] Set Console.OutputEncoding to UTF-8 only if current encoding is single byte --- de4dot.code/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/de4dot.code/Program.cs b/de4dot.code/Program.cs index bdc237ef..c04f3848 100644 --- a/de4dot.code/Program.cs +++ b/de4dot.code/Program.cs @@ -40,7 +40,8 @@ namespace de4dot { Utils.startUpArch = startUpArch; try { - Console.OutputEncoding = new UTF8Encoding(false); + if (Console.OutputEncoding.IsSingleByte) + Console.OutputEncoding = new UTF8Encoding(false); Log.n(""); Log.n("de4dot v{0} (BETA) Copyright (C) 2011 de4dot@gmail.com", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);