From 4c108d654214107fb8b2a2281e95696c6ec7b6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 12 Feb 2016 11:41:33 +0100 Subject: [PATCH] Remove Encoding workaround This was needed either because of constrained calls or interface calls. We now have both. Let's exercise those features. Fixes #213. --- .../src/System/Text/Encoding.cs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/System.Private.CoreLib/src/System/Text/Encoding.cs b/src/System.Private.CoreLib/src/System/Text/Encoding.cs index 61305b9406c..a6687ad7be3 100644 --- a/src/System.Private.CoreLib/src/System/Text/Encoding.cs +++ b/src/System.Private.CoreLib/src/System/Text/Encoding.cs @@ -288,13 +288,7 @@ public static Encoding GetEncoding(int codepage) if (s_encodings == null) Interlocked.CompareExchange(ref s_encodings, new EncodingCache(), null); -#if CORERT - // CORERT-TODO: For now, always return UTF8 encoding - // https://github.com/dotnet/corert/issues/213 - return UTF8; -#else return s_encodings.GetOrAdd(codepage); -#endif } private sealed class EncodingCache : ConcurrentUnifier @@ -418,13 +412,7 @@ public static Encoding GetEncoding(String name) // Otherwise, the code below will throw exception when trying to call // EncodingTable.GetCodePageFromName(). // -#if CORERT - // CORERT-TODO: For now, always return UTF8 encoding - // https://github.com/dotnet/corert/issues/213 - return UTF8; -#else return GetEncoding(EncodingTable.GetCodePageFromName(name)); -#endif } // Returns an Encoding object for a given name or a given code page value.