Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/System.Private.CoreLib/src/System/Text/Encoding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,7 @@ public static Encoding GetEncoding(int codepage)
if (s_encodings == null)
Interlocked.CompareExchange<EncodingCache>(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<int, Encoding>
Expand Down Expand Up @@ -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.
Expand Down