From e4510d854690144cd8029629d8fca8559dd54485 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Wed, 27 May 2015 13:35:38 -0400 Subject: [PATCH] [corlib] Let XI and XM define their own default encoding [#29928] 605192528de1a9c9c95a97bc5a2de7d3c85b322d used UTF8Unmarked for MONOTOUCH and XAMMAC. However it's initialized differently (than the old UTF8) and caused unit test regressions in System and System.Net.Http unit tests This new logic moves the default encoding creation into the products themselves. --- mcs/class/corlib/System.Text/EncodingHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcs/class/corlib/System.Text/EncodingHelper.cs b/mcs/class/corlib/System.Text/EncodingHelper.cs index f077e44e254..8e797d8cdc5 100644 --- a/mcs/class/corlib/System.Text/EncodingHelper.cs +++ b/mcs/class/corlib/System.Text/EncodingHelper.cs @@ -7,7 +7,7 @@ using System.Security; namespace System.Text { -internal static class EncodingHelper +internal static partial class EncodingHelper { // // Only internal, to be used by the class libraries: Unmarked and non-input-validating @@ -71,6 +71,7 @@ internal static class EncodingHelper [MethodImpl (MethodImplOptions.InternalCall)] extern internal static string InternalCodePage (ref int code_page); +#if !(MONOTOUCH || XAMMAC) internal static Encoding GetDefaultEncoding () { Encoding enc = null; @@ -105,6 +106,7 @@ internal static class EncodingHelper } return enc; } +#endif // Loaded copy of the "I18N" assembly. We need to move // this into a class in "System.Private" eventually. -- 2.11.4.GIT