Hi all, I'd like to submit what it seems to be a bug as for the Unicode
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C). For these codes I get the following
results:
+03F2: lowercase c:
Char.IsLetter() = true (OK)
Char.IsUpper() = false (OK)
Char.IsLower() = true (OK)
Char.ToUpper('\ x3f2') and .ToLower both = +03F2 (! I'd expect +03F9 for
ToUpper)
+03F9: uppercase C:
Char.IsLetter() = false (!)
Char.IsUpper() = false (!)
Char.IsLower() = false (OK)
Char.ToUpper('\ x3f9') and .ToLower both = +03F9 (! I'd expect +03F2 for
ToLower)
It appears that +03F9 is not treated as a 'letter' as it happens for +03F2,
which seems deprived of its capital form. I'd like to know if this is an
issue coming from an older Unicode version or it's just a bug or by some
design choice I can't catch, and if anyone using the .NET 2 Beta can tell me
how .NET 2.0 behaves about this.
If you 2.0 guys are as lazy as me, try the following code fragment to have a
test (just paste it into a console app):
static private void DumpSingleChar( char c)
{
Console.WriteLi ne("IsLetter = {0}", Char.IsLetter(c ));
Console.WriteLi ne("IsUpper = {0}", Char.IsUpper(c) );
Console.WriteLi ne("IsLower = {0}", Char.IsLower(c) );
Console.WriteLi ne("ToUpper = {0:X4}", (int)Char.ToUpp er(c));
Console.WriteLi ne("ToLower = {0:X4}", (int)Char.ToLow er(c));
}
[STAThread]
static void Main(string[] args)
{
Console.WriteLi ne("+03F2");
DumpSingleChar( '\x3F2');
Console.WriteLi ne("+03F9");
DumpSingleChar( '\x3F9');
}
Thanx!
compliance of methods like Char.Is...: as stated by the latest version of
Unicode, codes +03F2 and +03F9 represent Greek lunate sigma, lowercase and
uppercase respectively (c and C). For these codes I get the following
results:
+03F2: lowercase c:
Char.IsLetter() = true (OK)
Char.IsUpper() = false (OK)
Char.IsLower() = true (OK)
Char.ToUpper('\ x3f2') and .ToLower both = +03F2 (! I'd expect +03F9 for
ToUpper)
+03F9: uppercase C:
Char.IsLetter() = false (!)
Char.IsUpper() = false (!)
Char.IsLower() = false (OK)
Char.ToUpper('\ x3f9') and .ToLower both = +03F9 (! I'd expect +03F2 for
ToLower)
It appears that +03F9 is not treated as a 'letter' as it happens for +03F2,
which seems deprived of its capital form. I'd like to know if this is an
issue coming from an older Unicode version or it's just a bug or by some
design choice I can't catch, and if anyone using the .NET 2 Beta can tell me
how .NET 2.0 behaves about this.
If you 2.0 guys are as lazy as me, try the following code fragment to have a
test (just paste it into a console app):
static private void DumpSingleChar( char c)
{
Console.WriteLi ne("IsLetter = {0}", Char.IsLetter(c ));
Console.WriteLi ne("IsUpper = {0}", Char.IsUpper(c) );
Console.WriteLi ne("IsLower = {0}", Char.IsLower(c) );
Console.WriteLi ne("ToUpper = {0:X4}", (int)Char.ToUpp er(c));
Console.WriteLi ne("ToLower = {0:X4}", (int)Char.ToLow er(c));
}
[STAThread]
static void Main(string[] args)
{
Console.WriteLi ne("+03F2");
DumpSingleChar( '\x3F2');
Console.WriteLi ne("+03F9");
DumpSingleChar( '\x3F9');
}
Thanx!
Comment