You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be seen using the string "\xcc\x83\xc3\x92\xd5\x9b", which gets decomposed into "\xcc\x83\x4f\xcc\x80\xd5\x9b". On recompose, $lastUcls isn't reset on the ASCII "\x4f" so the string gets left in this decomposed form instead of the expected NFC normalized "\xcc\x83\xc3\x92\xd5\x9b".
This PR was merged into the 1.1-dev branch.
Discussion
----------
Normalizer fixes from @gitlostFixes#55, #57 and #58.
Commits
-------
b118d90 Normalizer::isNormalized() and ::normalize() should check for multibyte string function overload
152cce0 Normalizer::isNormalized() should fail with Normalizer::NONE
9a14abf Normalizer::recompose() should reset the last combining class on ASCII
This can be seen using the string "\xcc\x83\xc3\x92\xd5\x9b", which gets decomposed into "\xcc\x83\x4f\xcc\x80\xd5\x9b". On recompose, $lastUcls isn't reset on the ASCII "\x4f" so the string gets left in this decomposed form instead of the expected NFC normalized "\xcc\x83\xc3\x92\xd5\x9b".
The fix is reset the $lastUcls variable to zero on ASCII, see for instance the version of "Normalizer.php" I'm using in a fork of the WordPress plugin "tl-normalizer" https://github.com/gitlost/tl-normalizer/blob/master/Symfony/Normalizer.php#L184
The text was updated successfully, but these errors were encountered: