Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add case folding map #427

Merged
merged 1 commit into from
Jul 28, 2023
Merged

Conversation

alexandre-daubois
Copy link
Contributor

Fixes #173

@nicolas-grekas, I've indeed borrowed the map you pointed at in the issue. Thanks for this!

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merged map is available in https://github.com/symfony/string/blob/6.2/AbstractUnicodeString.php (and it looks like there are some duplicates in there? to be fixed also)

src/Mbstring/Mbstring.php Show resolved Hide resolved
src/Mbstring/Resources/unidata/caseFolding.php Outdated Show resolved Hide resolved
@nicolas-grekas
Copy link
Member

Please have a look at failing tests, they might be related.

@alexandre-daubois
Copy link
Contributor Author

alexandre-daubois commented Jan 30, 2023

Updated the map 👍 Removed duplicates also in Symfony: symfony/symfony#49159, thanks for pointing this out!

I'm checking the tests. they seem a bit tricky as some characters are being case folded by two chars, which introduces an offset when it comes to stristr for instance.

@alexandre-daubois alexandre-daubois force-pushed the case-folding branch 3 times, most recently from 9fe0792 to 176bf2e Compare January 30, 2023 19:50
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Feb 1, 2023
This PR was merged into the 5.4 branch.

Discussion
----------

[String] Remove duplicates in fold maps

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Related to symfony/polyfill#427
| License       | MIT
| Doc PR        | _NA_

Commits
-------

858c6e9 [String] Remove duplicates in fold maps
@nicolas-grekas nicolas-grekas force-pushed the case-folding branch 2 times, most recently from d1ff0bc to 0cf134b Compare February 3, 2023 08:34
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures were related, I fixed them then force-pushed, please fetch before the next iteration :)

src/Mbstring/Mbstring.php Outdated Show resolved Hide resolved
@nicolas-grekas
Copy link
Member

Thank you @alexandre-daubois.

@nicolas-grekas nicolas-grekas merged commit 99e610e into symfony:main Jul 28, 2023
8 of 9 checks passed
@alexandre-daubois alexandre-daubois deleted the case-folding branch July 28, 2023 09:03
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.

MB_CASE_FOLD doesn't handle ẞ character properly
3 participants