Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Toshok <toshok@novell.com>2009-12-09 20:38:57 +0300
committerChris Toshok <toshok@novell.com>2009-12-09 20:38:57 +0300
commit1c102ac0d51469c9c4dd245b82ff8a3cc485a67e (patch)
tree3f2adfff4d780b784d1dde06ed02915e7914afd7
parentc8167fc35610c38bd8c0760285767f4bce3c41bf (diff)
2009-12-09 Chris Toshok <toshok@ximian.com>mono-2-6-rc1
* Encoding.cs (get_Default): moonlight defaults to UTF8, not UTF8Unmarked. svn path=/branches/mono-2-6/mcs/; revision=147922
-rw-r--r--mcs/class/corlib/System.Text/ChangeLog5
-rw-r--r--mcs/class/corlib/System.Text/Encoding.cs8
2 files changed, 13 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Text/ChangeLog b/mcs/class/corlib/System.Text/ChangeLog
index 61d5f47ed4d..07ca6eabda9 100644
--- a/mcs/class/corlib/System.Text/ChangeLog
+++ b/mcs/class/corlib/System.Text/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-09 Chris Toshok <toshok@ximian.com>
+
+ * Encoding.cs (get_Default): moonlight defaults to UTF8, not
+ UTF8Unmarked.
+
2009-10-06 Sebastien Pouliot <sebastien@ximian.com>
* Encoding.cs: Remove normalization methods for Moonlight
diff --git a/mcs/class/corlib/System.Text/Encoding.cs b/mcs/class/corlib/System.Text/Encoding.cs
index e3060c5b677..fa2e3e4d997 100644
--- a/mcs/class/corlib/System.Text/Encoding.cs
+++ b/mcs/class/corlib/System.Text/Encoding.cs
@@ -931,12 +931,20 @@ public abstract class Encoding
defaultEncoding = GetEncoding (code_page);
}
} catch (NotSupportedException) {
+#if NET_2_1 && !MONOTOUCH
+ defaultEncoding = UTF8;
+#else
// code_page is not supported on underlying platform
defaultEncoding = UTF8Unmarked;
+#endif
} catch (ArgumentException) {
// code_page_name is not a valid code page, or is
// not supported by underlying OS
+#if NET_2_1 && !MONOTOUCH
+ defaultEncoding = UTF8;
+#else
defaultEncoding = UTF8Unmarked;
+#endif
}
#if NET_2_0
defaultEncoding.is_readonly = true;