Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regcomp.c: fix perl #129950 - fix firstchar bitmap under utf8 with pr…
…efix optimisation The trie code contains a number of sub optimisations, one of which extracts common prefixes from alternations, and another which isa bitmap of the possible matching first chars. The bitmap needs to contain the possible first octets of the string which the trie can match, and for codepoints which might have a different first octet under utf8 or non-utf8 need to register BOTH codepoints. So for instance in the pattern (?:a|a\x{E4}) we should restructure this as a(|\x{E4), and the bitmap for the trie should contain both \x{E4} AND \x{C3} as \x{C3} is the first byte of \x{EF} expressed as utf8.
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters