Skip to content

Commit

Permalink
feature #48396 [Intl] Add a special locale to strip emojis easily wit…
Browse files Browse the repository at this point in the history
…h `EmojiTransliterator` (fancyweb)

This PR was merged into the 6.3 branch.

Discussion
----------

[Intl] Add a special locale to strip emojis easily with `EmojiTransliterator`

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

I'd like to add a special locale `strip` to the emoji transliterator to easily remove all emojis from a string. It would only work with valid input/emojis.

Removing emojis from a string is not easy. Regexes are complicated and most of the time not up-to-date with the latest Unicode versions. I thought we could leverage the new transliterator 😄

Commits
-------

b8254be [Intl] Add a special locale to strip emojis easily with EmojiTransliterator
  • Loading branch information
nicolas-grekas committed Dec 22, 2022
2 parents dfcb811 + b8254be commit ad892c1
Show file tree
Hide file tree
Showing 4 changed files with 4,773 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Symfony/Component/Intl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.3
---

* Add the special `strip` locale to `EmojiTransliterator` to strip all emojis from a string

6.2
---

Expand Down

0 comments on commit ad892c1

Please sign in to comment.