Skip to content

Conversation

@carenas
Copy link
Contributor

@carenas carenas commented Oct 15, 2024

As a solution that could be used to avoid the ambiguous syntax of the other escape sequences supported by pcre2test, add \N{U+hh...}

Includes bugfixes to the handling of \o{dd...} and hopefully improved documentation and tests.

When providing escaped values in the subject, the syntax can be
ambiguous, so add support for a new escape that is always meant
to refer to a Unicode character and that is already supported
by the library in utf mode.

While at it, refactor the code to support octal escapes and fix
bugs with overlong numbers, as well to simplify the logic that
decides if an escape is encoded as a code unit or as an Unicode
character, that could require multiple code units.
@zherczeg
Copy link
Collaborator

Nice patch!

@PhilipHazel PhilipHazel merged commit 03be4d2 into PCRE2Project:master Oct 16, 2024
15 checks passed
@carenas carenas deleted the pcre2test-bsn branch October 16, 2024 14:27
@PhilipHazel
Copy link
Collaborator

Oops. Forgot to check that the "last updated" line had been updated in pcre2test.1. Perhaps it will get updated again before the next release, so I won't update it specially. I do think it is useful to have dates on documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants