Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79695 --- shadow/79695 2006-10-18 18:29:47.000000000 -0400 +++ shadow/79695.tmp.24129 2006-12-16 17:27:39.000000000 -0500 @@ -1,14 +1,14 @@ Bug#: 79695 Product: Mono: Class Libraries Version: 1.1 -OS: +OS: unknown OS Details: OpenSuSE Status: NEW Resolution: -Severity: +Severity: Unknown Priority: Minor Component: Sys.Data AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- @@ -63,6 +63,52 @@ foreach (System.Data.DataRow row in dataTable.Select("Name = 'Mike'")) System.Console.WriteLine(row[0]); } } + +------- Additional Comments From [EMAIL PROTECTED] 2006-12-16 17:27 ------- +A modified version of the test program reveals exactly which +"whitespace" characters are ignored when comparing strings. The +WhiteChars array below is from the String.cs class in corlib. + +using System; + +class MainClass { + private static readonly char[] WhiteChars = { (char) 0x9, (char) +0xA, (char) 0xB, (char) 0xC, (char) 0xD, +#if NET_2_0 + (char) 0x85, (char) 0x1680, (char) 0x2028, (char) 0x2029, +#endif + (char) 0x20, (char) 0xA0, (char) 0x2000, (char) 0x2001, (char) +0x2002, (char) 0x2003, (char) 0x2004, + (char) 0x2005, (char) 0x2006, (char) 0x2007, (char) 0x2008, (char) +0x2009, (char) 0x200A, (char) 0x200B, + (char) 0x3000, (char) 0xFEFF }; + + static void Main(string[] args) + { + System.Data.DataTable dataTable = new System.Data.DataTable("Person"); + dataTable.CaseSensitive = true; + dataTable.Columns.Add("Name", typeof(string)); + dataTable.Columns.Add("Code", typeof(int)); + foreach (char c in WhiteChars) + dataTable.Rows.Add(new object[] {"Mike" + c, c}); + foreach (System.Data.DataRow row in dataTable.Select("Name = 'Mike'")) + System.Console.WriteLine(String.Format("0x{0:X}", row[1])); + } +} + +The program only shows hex codes for chars which are ignored when +found at the end of strings before doing the comparison. The .NET 2.0 +runtime outputs the following codes: + +0x20 (space) +0x3000 +0xFEFF + +Mono only outputs + +0xFEFF + +I will post a patch & test case immediately. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
