[Intl] Add a special locale to strip emojis easily with EmojiTransliterator#48396
[Intl] Add a special locale to strip emojis easily with EmojiTransliterator#48396nicolas-grekas merged 1 commit intosymfony:6.3from
EmojiTransliterator#48396Conversation
|
I like this feature (and I've needed it myself more than once ... I agree with what you said about regexes). What I don't like is "hacking" this feature as a special non-real locale. This is a convention that developers must learn, so it makes it a bit more difficult. I wonder if we could add a |
EmojiTransliterator
|
i'd still be in favor of String integration, |
That'd be 👎 on my side. I don't see why this specific translit rule would deserve such an important place. |
|
i assumed our removeEmoji() removed emoji, but in fact it transliterates them to codes 🤦 (based on https://github.com/aaronpk/emoji-detector-php) nevertheless i still think controlling the emoji at String level is nice to have |
|
Thank you @fancyweb. |
I'd like to add a special locale
stripto 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 😄