ext/mbstring: fix the version of the character index change, it shipped in 8.3.2 - #5797
Open
lacatoire wants to merge 1 commit into
Open
ext/mbstring: fix the version of the character index change, it shipped in 8.3.2#5797lacatoire wants to merge 1 commit into
lacatoire wants to merge 1 commit into
Conversation
…ed in 8.3.2
The mb_substr changelog dated the character index change to 8.4.0, which
is what UPGRADING says, but the commit landed on the PHP-8.3 branch and
the first release containing it is 8.3.2. Verified by bisecting the
official images: mb_substr("A\x85\xABB", 1, 1, "SJIS-mac") returns the
whole SJIS unit on 8.3.1 and a single codepoint from 8.3.2 onwards, and
mb_substr("\xf0start", 1, 5) likewise flips at the same boundary.
- mb-substr.xml: merge the two rows into a single 8.3.2 entry, both
described the same commit
- mb-strstr.xml: add the same entry, mb_strstr is affected too and had no
changelog for it
- migration84/incompatible.xml: state the actual version, the change is
still relevant to anyone upgrading from 8.3.0 or 8.3.1
- use the encoding name the manual and php-src actually use, SJIS-mac,
and drop the "around 40" figure, an exhaustive scan of the two byte
SJIS-mac units gives 56
- mb-substr.xml: take the seealso simplelist out of its para
- book.xml: the Unicode table version is not a standing fact, 8.5.0
updated the tables to Unicode 17.0, so name both releases
Sources
- php-src ec348a12d11 ("Character indices used by mb_strpos and mb_substr
have same meaning, even on invalid strings", 2023-12-06), first tag
php-8.3.2
- php-src 3afb96184e7 ("ext/mbstring: Update to Unicode 16"), first tag
php-8.4.0RC1
- php-src edc26712278 ("ext/mbstring: Update to Unicode 17.0"), PHP-8.5
lacatoire
force-pushed
the
group/mbstring-8.4
branch
from
August 26, 2026 09:35
e80922d to
c92d857
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
mb_substrchangelog dated the character index change to 8.4.0, which is whatUPGRADINGsays, but the commit landed on thePHP-8.3branch and the first release containing it is 8.3.2.git tag --contains ec348a12d11givesphp-8.3.2before any 8.4 tag, and the official images bisect cleanly:mb_substr("A\x85\xABB", 1, 1, "SJIS-mac")mb_substr("\xf0start", 1, 5)85ab(whole SJIS unit)rt3f(single codepoint)start3fstartA user on 8.3 reading the current table concludes they are unaffected, which is the failure mode the changelog exists to prevent.
mb-substr.xml: merge the two rows into a single 8.3.2 entry, both described the same commitmb-strstr.xml: add the same entry,mb_strstris affected too (mb_strstr("A\x85\xABB", "B", true, "SJIS-mac")returns4185ab42on 8.3.1,4185abfrom 8.3.2) and had no changelog for itmigration84/incompatible.xml: state the actual version; the change is still relevant to anyone upgrading from 8.3.0 or 8.3.1SJIS-mac(supported-encodings.xml,mbfilter_cjk.c), and drop the "around 40" figure: an exhaustive scan of the two-byteSJIS-macunits gives 56 that produce several codepointsmb-substr.xml: take the seealsosimplelistout of itsparabook.xml: the Unicode table version is not a standing fact, 8.5.0 updated the tables to Unicode 17.0, so name both releases rather than leaving the intro false for 8.5 readersSources
SJIS-macec348a12d11- "Character indices used by mb_strpos and mb_substr have same meaning, even on invalid strings" (2023-12-06), first tagphp-8.3.23afb96184e7("ext/mbstring: Update to Unicode 16"), first tagphp-8.4.0RC1edc26712278("ext/mbstring: Update to Unicode 17.0"),PHP-8.5Note: the 8.4
UPGRADINGentry is itself mis-attributed, the change shipped silently in 8.3.2 with noNEWSentry. A php-src correction would be the root fix.