Skip to content

pattern on OTP 27: \w, \b and the POSIX letter classes also take the Latin-1 letters - #78

Merged
HackTuah merged 1 commit into
mainfrom
fix/pattern-classes-otp27
Sep 26, 2026
Merged

HackTuah merged 1 commit into
mainfrom
fix/pattern-classes-otp27

Conversation

@HackTuah

Copy link
Copy Markdown
Member

The floor leg failed on main at 289dbdb: on OTP 27, ^\w$ matched é. OTP 27's :re is PCRE with Latin-1 character tables and has no ASCII option, so \w, \b and [[:alpha:]] also take U+00AA to U+00FF there (65 code points; \d, \s and $ stay ASCII). From OTP 28 (PCRE2) all are ASCII. Measured over U+0080..U+2FFF on 27, 28 and 29.

This states it in BeamMCP.Schema's moduledoc and the CHANGELOG (with [A-Za-z0-9_] for a host that means ASCII letters), and the test pins each release's reading. The 0.10.1 heading takes the release day.

Local: the sixteen-step gate passes on OTP 28; the test file passes on OTP 27 / Elixir 1.17 in a container. This PR's CI runs all three legs.

…Latin-1 letters; stated and pinned by release

The floor leg (OTP 27, Elixir 1.17) failed on main at 289dbdb: `^\w$` matched "é". OTP 27's
:re is PCRE with Latin-1 character tables and has no ASCII ones, so without :ucp its \w, \b
and [[:alpha:]] still take U+00AA to U+00FF (65 code points); \d, \s and $ are ASCII there
too, and from OTP 28 (PCRE2) all of them are. Measured over U+0080..U+2FFF on OTP 27, 28 and 29.
No option of :re makes the tables ASCII on 27, so the moduledoc and the CHANGELOG say so, with
[A-Za-z0-9_] as the spelling for a host that means ASCII letters, and the test pins each
release's reading: é refused from 28 and admitted on 27, Ā and U+00A0 refused on both. The
test file passes on OTP 27 / Elixir 1.17 (container) and 28. The 0.10.1 heading takes the
release day, 2026-09-26.

Signed-off-by: Ayla Croft <aylacroft@proton.me>
@HackTuah
HackTuah requested a review from minitru September 26, 2026 18:49
@HackTuah
HackTuah merged commit 04548e1 into main Sep 26, 2026
19 of 21 checks passed
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.

1 participant