Author: gonzalo
Date: 2006-01-19 19:47:16 -0500 (Thu, 19 Jan 2006)
New Revision: 55804

Modified:
   trunk/mcs/class/corlib/System/ChangeLog
   trunk/mcs/class/corlib/System/Console.cs
Log:
2006-01-19 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * Console.cs: if InternalCodePage returns -1, use the default encoding.
        Also match the UTF8 one properly. Patch by [EMAIL PROTECTED]



Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog     2006-01-20 00:02:53 UTC (rev 
55803)
+++ trunk/mcs/class/corlib/System/ChangeLog     2006-01-20 00:47:16 UTC (rev 
55804)
@@ -1,3 +1,8 @@
+2006-01-19 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * Console.cs: if InternalCodePage returns -1, use the default encoding.
+       Also match the UTF8 one properly. Patch by [EMAIL PROTECTED]
+
 2006-01-19  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * ModuleHandle.cs : GetPEKind() is not public in 2.0 RTM.

Modified: trunk/mcs/class/corlib/System/Console.cs
===================================================================
--- trunk/mcs/class/corlib/System/Console.cs    2006-01-20 00:02:53 UTC (rev 
55803)
+++ trunk/mcs/class/corlib/System/Console.cs    2006-01-20 00:47:16 UTC (rev 
55804)
@@ -63,7 +63,8 @@
                                // On Unix systems (128), do not output the
                                // UTF-8 ZWNBSP (zero-width non-breaking space).
                                //
-                               if (code_page == UTF8Encoding.UTF8_CODE_PAGE || 
((code_page & 0x10000000) != 0))
+                               if (code_page != -1 && ((code_page & 
0x0fffffff) == 3 // UTF8Encoding.UTF8_CODE_PAGE
+                                       || ((code_page & 0x10000000) != 0)))
                                        encoding = Encoding.UTF8Unmarked;
                                else
                                        encoding = Encoding.Default;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to