From: Sebastien Pouliot Date: Wed, 27 May 2015 17:35:38 +0000 (-0400) Subject: [corlib] Let XI and XM define their own default encoding [#29928] X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=d6b6950a77da50f679abd9c197b8764de1f84fe8;p=mono.git [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. --- 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. diff --git a/mcs/class/corlib/monotouch_runtime_corlib.dll.sources b/mcs/class/corlib/monotouch_runtime_corlib.dll.sources new file mode 100644 index 00000000000..9e173da97f7 --- /dev/null +++ b/mcs/class/corlib/monotouch_runtime_corlib.dll.sources @@ -0,0 +1 @@ +#include corlib.dll.sources \ No newline at end of file