Author: atsushi
Date: 2005-04-06 04:46:21 -0400 (Wed, 06 Apr 2005)
New Revision: 42597
Modified:
trunk/mcs/class/corlib/System.Globalization/ChangeLog
trunk/mcs/class/corlib/System.Globalization/TextInfo.cs
trunk/mcs/class/corlib/System/ChangeLog
trunk/mcs/class/corlib/System/Char.cs
Log:
2005-04-06 Atsushi Enomoto <[EMAIL PROTECTED]>
* Char.cs : ToUpper()/ToLower() comparison ranges were incorrect.
* TextInfo.cs : To make new CultureInfo (127) as invariant, it should
not compare object Equals() against InvariantCulture.
Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog 2005-04-06 08:44:49 UTC (rev
42596)
+++ trunk/mcs/class/corlib/System/ChangeLog 2005-04-06 08:46:21 UTC (rev
42597)
@@ -1,3 +1,7 @@
+2005-04-06 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * Char.cs : ToUpper()/ToLower() comparison ranges were incorrect.
+
2005-04-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* _AppDomain.cs: Add security checks to the interface. Declarative
Modified: trunk/mcs/class/corlib/System/Char.cs
===================================================================
--- trunk/mcs/class/corlib/System/Char.cs 2005-04-06 08:44:49 UTC (rev
42596)
+++ trunk/mcs/class/corlib/System/Char.cs 2005-04-06 08:46:21 UTC (rev
42597)
@@ -498,8 +498,8 @@
unsafe {
if (c <= ((char)0x24cf))
return (char) to_lower_data_low [c];
- if (c >= ((char)0xff41))
- return (char) to_lower_data_high[c -
0xff41];
+ if (c >= ((char)0xff21))
+ return (char) to_lower_data_high[c -
0xff21];
}
return c;
}
@@ -522,7 +522,7 @@
internal static char ToUpperInvariant (char c)
{
unsafe {
- if (c <= ((char)0x24cf))
+ if (c <= ((char)0x24e9))
return (char) to_upper_data_low [c];
if (c >= ((char)0xff21))
return (char) to_upper_data_high [c -
0xff21];
Modified: trunk/mcs/class/corlib/System.Globalization/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Globalization/ChangeLog 2005-04-06
08:44:49 UTC (rev 42596)
+++ trunk/mcs/class/corlib/System.Globalization/ChangeLog 2005-04-06
08:46:21 UTC (rev 42597)
@@ -1,3 +1,8 @@
+2005-04-06 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * TextInfo.cs : To make new CultureInfo (127) as invariant, it should
+ not compare object Equals() against InvariantCulture.
+
2005-04-05 Atsushi Enomoto <[EMAIL PROTECTED]>
* TextInfo.cs : Fixed ToTitleCase() so that
Modified: trunk/mcs/class/corlib/System.Globalization/TextInfo.cs
===================================================================
--- trunk/mcs/class/corlib/System.Globalization/TextInfo.cs 2005-04-06
08:44:49 UTC (rev 42596)
+++ trunk/mcs/class/corlib/System.Globalization/TextInfo.cs 2005-04-06
08:46:21 UTC (rev 42597)
@@ -216,13 +216,13 @@
// (enumerable enough).
public virtual char ToLower (char c)
{
- if (ci == CultureInfo.InvariantCulture)
+ if (ci.LCID == 0x7F)
return Char.ToLowerInvariant (c);
switch ((int) c) {
case '\u0049': // Latin uppercase I
CultureInfo tmp = ci;
- while (tmp.Parent != tmp && tmp.Parent !=
CultureInfo.InvariantCulture)
+ while (tmp.Parent != tmp && tmp.Parent.LCID !=
0x7F)
tmp = tmp.Parent;
switch (tmp.LCID) {
case 44: // Azeri (az)
@@ -258,13 +258,13 @@
public virtual char ToUpper (char c)
{
- if (ci == CultureInfo.InvariantCulture)
+ if (ci.LCID == 0x7F)
return Char.ToUpperInvariant (c);
switch (c) {
case '\u0069': // Latin lowercase i
CultureInfo tmp = ci;
- while (tmp.Parent != tmp && tmp.Parent !=
CultureInfo.InvariantCulture)
+ while (tmp.Parent != tmp && tmp.Parent.LCID !=
0x7F)
tmp = tmp.Parent;
switch (tmp.LCID) {
case 44: // Azeri (az)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches