neo-devpack-dotnet icon indicating copy to clipboard operation
neo-devpack-dotnet copied to clipboard

Some Problems in `System.Char.cs`

Open nan01ab opened this issue 1 year ago • 0 comments

According to the previous two issues(#1193, #1194), there are some different implementations with C# stdlib on determining a char is white space or not(and string.Trim and char.IsWhiteSpace is different too).

Then I checked other methods in System.Char.cs, and found that HandleCharIsPunctuation and HandleCharIsSymbol are different semantics with C# stdlib on ASCII chars.

HandleCharIsPunctuation: for char set [ 33 - 47, 59 - 64, 91 - 96, 123 - 126], char.IsPunctuation returns true when char in set [33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 58, 59, 63, 64, 91, 92, 93, 95, 123, 125].

HandleCharIsSymbol: for char set [ 36 - 43, 60 - 64, 91 - 96, 123 - 126], char.IsSymbol returns true when char in set [ 36, 43, 60, 61, 62, 94, 96, 124, 126].

nan01ab avatar Oct 04 '24 03:10 nan01ab