You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
String.CompareTo Behaviour different between WIN10 & Linux #36177
This is by design for the .NET as we depend on the underlying OS for globalization support. so it is expected to see some behavior differences when running on Windows against Linux. @benaadams suggestion to use ordinal comparison should help if this will be ok in your scenario.
In .NET Core 5.0, we have started to use the ICU library on Windows too. That means the behavior on Windows and Linux should be the same or very close. You may give it a try.
Activity
benaadams commentedon May 10, 2020
Different culture between the two? Try using
.CompareOrdinaltarekgh commentedon May 10, 2020
This is by design for the .NET as we depend on the underlying OS for globalization support. so it is expected to see some behavior differences when running on Windows against Linux. @benaadams suggestion to use ordinal comparison should help if this will be ok in your scenario.
In .NET Core 5.0, we have started to use the ICU library on Windows too. That means the behavior on Windows and Linux should be the same or very close. You may give it a try.
Ninds commentedon May 17, 2020
Cheers. Tweaking the culture indeed yielded the required behaviour.