Closed
Description
Symfony version(s) affected
6.4,7.0,7.1
Description
Hierarchical metadata (this character: ↑↑↑
) are copied into the resource files, leading to arrows beeing inserted in the texts.
I took a list of "top 100 emojis" to see how what proportion was concerned and went through all the xx_YY files.
Locale | Emojis | Fleches | % error |
---|---|---|---|
en_CA | 0 | 100 | 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 |
fr_CA | 26 | 74 | 🟢 🟢 🟢 🔴 🔴 🔴 🔴 🔴 🔴 🔴 |
es_MX | 34 | 66 | 🟢 🟢 🟢 🔴 🔴 🔴 🔴 🔴 🔴 🔴 |
en_IN | 0 | 100 | 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 🔴 |
How to reproduce
$message = 'Hello 🐨 ❤️ 🤣';
echo (EmojiTransliterator::create('fr'))->transliterate($message).PHP_EOL;
echo (EmojiTransliterator::create('fr_CA'))->transliterate($message).PHP_EOL;
// --> Hello koala cœur rouge️ se rouler par terre de rire
// --> Hello ↑↑↑ ↑↑↑️ rire à se rouler par terre
Obviously it impacts the Slugger with Emoji
$message = '🐨❤️';
echo (new AsciiSlugger('fr'))->withEmoji()->slug($message).PHP_EOL;
echo (new AsciiSlugger('fr_CA'))->withEmoji()->slug($message).PHP_EOL;
// --> koala-coeur-rouge
// -->
Possible Solution
Something to adapt in the files generation.
Additional Context
No response