Unicode Support for Case Insensitive Matching #122536
Draft
+779
−21
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.
Related to fixing: #109385
I am been investigating a good solution to fixing our various regex engines to support unicode matches similar to utilities like
java.util.regex.Pattern
.There is unfortunately not a great way to do this without hard coding a number of edge case in the Unicode spec found here:
https://www.unicode.org/Public/16.0.0/ucd/CaseFolding.txt
I've considered various options to deal with some of the edge cases which are detailed in the Lucene PR for RegExp here: apache/lucene#14192
I will refine this PR based on the outcomes in the Lucene PR and see if I can reconcile our various regex approaches to incorporate a consistent case insensitive flag. For now this Draft PR is a placeholder for that work so I don't lose it.
I have a set of utilities for validating and generating these mappings that I've held back for now pending figuring out where I can put them.