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
Cleanup using StringComparison.CurrentCulture #8064
For stable behavior InvariantCulture looks right for date and time formats but Unicode standard Simple Case Folding is better for comparison and sorting.
Choosing a consistent default across cmdlets and operators (#8064) is a great idea, but I wonder if that's considered an acceptable breaking change; while that #8566 was indeed a breaking change, this was driven by unacceptable behavior having surfaced on Unix.
It seems is a huge work but I believe that we could investigate till next LTS version when we could accept possible breaking changes.
Thank you Michael Klement (@mklement0) and Ilya (@iSazonov) , I've opened #8824 to track this explicitly then. I hope we can get the same behavior cross-platform consistency for sort and related functionality on PowerShell Core that Ruby, JavaScript, Python, et. al. exhibit. And certainly the default behavior on Linux (or at least Ubuntu 18.04) is different than PowerShell Desktop, which besides being the source of 99.999% of PowerShell scripts, has set the most usable standard here, where comparisons are case insensitive.
Activity
iSazonov commentedon Feb 2, 2019
Michael Klement (@mklement0) I invite you based on your #8180 (comment)
It seems is a huge work but I believe that we could investigate till next LTS version when we could accept possible breaking changes.
adamedx commentedon Feb 3, 2019
Adding what may be a related issue encountered in 6.1.2 where
sort-objectbehaves differently on the same input on Windows vs. Linux:In my case, tests caught this, but the impact is actually a real defect.
iSazonov commentedon Feb 4, 2019
Adam Edwards (@adamedx) Can you confirm that you still see that in 6.2.0 Preview4? If so please open new issue.
mklement0 commentedon Feb 4, 2019
Adam Edwards (@adamedx): I think what you're seeing is a manifestation of CoreFx bug https://github.com/dotnet/corefx/issues/28611
(even though the CoreFx team doesn't view it as a bug and has, regrettably, chosen to simply document the issue).
That is, your locale is probably set to
CorPOSIX(possibly followed by.UTF-8).Run the following commands from
bash(or a similar POSIX-like shell):With a specific locale (culture), the problem does not occur:
Note that using the standard
sortutility does not exhibit the problem with theC/POSIXlocale:adamedx commentedon Feb 4, 2019
Thank you Michael Klement (@mklement0) and Ilya (@iSazonov) , I've opened #8824 to track this explicitly then. I hope we can get the same behavior cross-platform consistency for sort and related functionality on PowerShell Core that Ruby, JavaScript, Python, et. al. exhibit. And certainly the default behavior on Linux (or at least Ubuntu 18.04) is different than PowerShell Desktop, which besides being the source of 99.999% of PowerShell scripts, has set the most usable standard here, where comparisons are case insensitive.