Author: krasnov
Date: 2006-09-10 08:16:13 -0400 (Sun, 10 Sep 2006)
New Revision: 65164

Modified:
   branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/ChangeLog
   branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/HttpWriter.cs
Log:
* HttpWriter.cs: fixed WriteLine to work correctly in utf-16 encoding


Modified: 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/ChangeLog     
2006-09-10 12:07:29 UTC (rev 65163)
+++ branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/ChangeLog     
2006-09-10 12:16:13 UTC (rev 65164)
@@ -1,3 +1,7 @@
+2006-09-10  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
+       * HttpWriter.cs: fixed WriteLine to work correctly in utf-16 encoding
+
 2006-09-07 Andrew Skiba <[EMAIL PROTECTED]>
 
        * HttpApplicationFactory.cs: ifdef the previous fix with TARGET_JVM to

Modified: 
branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/HttpWriter.cs
===================================================================
--- branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/HttpWriter.cs 
2006-09-10 12:07:29 UTC (rev 65163)
+++ branches/mainsoft/gh20preview/mcs/class/System.Web/System.Web/HttpWriter.cs 
2006-09-10 12:16:13 UTC (rev 65164)
@@ -130,16 +130,11 @@
                        response.Flush ();
                }
 
-               static byte [] newline = new byte [2] { 13, 10 };
+               static char [] newline = new char [2] { '\r', '\n' };
                
                public override void WriteLine ()
                {
-                       output_stream.Write (newline, 0, 2);
-                       
-                       if (response.buffer)
-                               return;
-
-                       response.Flush ();
+                       Write (newline);
                }
 
                public void WriteString (string s, int index, int count)

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

Reply via email to