Author: atsushi
Date: 2005-11-16 06:11:04 -0500 (Wed, 16 Nov 2005)
New Revision: 53106
Modified:
trunk/mcs/class/I18N/CJK/CP936.cs
trunk/mcs/class/I18N/CJK/ChangeLog
trunk/mcs/class/I18N/CJK/GB18030Encoding.cs
trunk/mcs/class/I18N/CJK/Gb2312Convert.cs
Log:
2005-11-16 Atsushi Enomoto <[EMAIL PROTECTED]>
* GB2312Convert.cs , CP936.cs, GB18030Encoding.cs : don't handle
single byte characters in UcsToGbk. Fixed GB2312 part of #76722.
Modified: trunk/mcs/class/I18N/CJK/CP936.cs
===================================================================
--- trunk/mcs/class/I18N/CJK/CP936.cs 2005-11-16 10:37:30 UTC (rev 53105)
+++ trunk/mcs/class/I18N/CJK/CP936.cs 2005-11-16 11:11:04 UTC (rev 53106)
@@ -77,13 +77,13 @@
if (posn >= byteLength)
throw new ArgumentException ("bytes",
Strings.GetString ("Arg_InsufficientSpace"));
-/*
if (ch <= 0x80 || ch == 0xFF) {
// Character maps to itself
bytes[posn++] = (byte)ch;
continue;
}
+/*
byte byte1=0, byte2=0;
int tablepos;
Modified: trunk/mcs/class/I18N/CJK/ChangeLog
===================================================================
--- trunk/mcs/class/I18N/CJK/ChangeLog 2005-11-16 10:37:30 UTC (rev 53105)
+++ trunk/mcs/class/I18N/CJK/ChangeLog 2005-11-16 11:11:04 UTC (rev 53106)
@@ -1,3 +1,8 @@
+2005-11-16 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * GB2312Convert.cs , CP936.cs, GB18030Encoding.cs : don't handle
+ single byte characters in UcsToGbk. Fixed GB2312 part of #76722.
+
2005-11-01 Atsushi Enomoto <[EMAIL PROTECTED]>
* CP949.cs : Now it contains both CP949 (UHC) and CP51949 (EUC) for
Modified: trunk/mcs/class/I18N/CJK/GB18030Encoding.cs
===================================================================
--- trunk/mcs/class/I18N/CJK/GB18030Encoding.cs 2005-11-16 10:37:30 UTC (rev
53105)
+++ trunk/mcs/class/I18N/CJK/GB18030Encoding.cs 2005-11-16 11:11:04 UTC (rev
53106)
@@ -333,6 +333,9 @@
long value = GB18030Source.FromUCS (ch);
if (value == 0) {
+ if (ch <= 0x80 || ch == 0xFF)
+ // Character maps to itself
+ return ch;
// GB2312
value = gb2312.UcsToGbk (ch);
bytes [byteIndex++] = (byte) (value /
0x100);
Modified: trunk/mcs/class/I18N/CJK/Gb2312Convert.cs
===================================================================
--- trunk/mcs/class/I18N/CJK/Gb2312Convert.cs 2005-11-16 10:37:30 UTC (rev
53105)
+++ trunk/mcs/class/I18N/CJK/Gb2312Convert.cs 2005-11-16 11:11:04 UTC (rev
53106)
@@ -110,10 +110,6 @@
public int UcsToGbk (int ch)
{
- if (ch <= 0x80 || ch == 0xFF)
- // Character maps to itself
- return ch;
-
byte byte1 = 0, byte2 = 0;
int tablepos;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches