Culture support for in operator and Sort function #2539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
in
operator andSort
function were not culturally aware, resulting in incorrect results for Turkish and other I'm sure other languages.The
Lower
,Upper
,Proper
, andSortByColumns
functions are already culturally aware.Our regular expression functions are not culturally aware, but that is an interesting design choice that is the subject of #2538.
For testing, this PR adds the ability to change the culture in this local REPL only, with a
Language
function overload that takes a language tag as the first argument. Also added is a#SETUP
handler to specify the culture for a .txt test file.Removed
ToLower
from StringValue. It doesn't have enough context to do this on its own and be self contained, better to be very clear about how it is being done withCultureInfo
.