Permalink
Browse files

2009-12-09 Chris Toshok <toshok@ximian.com>

	* Encoding.cs (get_Default): moonlight defaults to UTF8, not
	UTF8Unmarked.

svn path=/branches/mono-2-6/mcs/; revision=147922
  • Loading branch information...
1 parent c8167fc commit 1c102ac0d51469c9c4dd245b82ff8a3cc485a67e Chris Toshok committed Dec 9, 2009
Showing with 13 additions and 0 deletions.
  1. +5 −0 mcs/class/corlib/System.Text/ChangeLog
  2. +8 −0 mcs/class/corlib/System.Text/Encoding.cs
@@ -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
@@ -931,12 +931,20 @@ public static Encoding Default
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;

0 comments on commit 1c102ac

Please sign in to comment.