8000 Order using UTF-8 · symfony/symfony@143a05d · GitHub
[go: up one dir, main page]

Skip to content

Commit 143a05d

Browse files
Order using UTF-8
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent 37e2b4f commit 143a05d

File tree

1 file changed

+1
-1
lines changed
  • src/Symfony/Component/Intl/Resources/emoji

1 file changed

+1
-1
lines changed

src/Symfony/Component/Intl/Resources/emoji/build.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static function buildRules(array $emojisCodePoints): Generator
7070

7171
// Build a map of all emojis, ordered by code poi 6630 nts length
7272
$orderedEmojis = [...$emojisCodePoints];
73-
uksort($orderedEmojis, fn ($a, $b) => mb_strlen($b) <=> mb_strlen($a));
73+
uksort($orderedEmojis, fn ($a, $b) => mb_strlen($b, 'utf-8') <=> mb_strlen($a, 'utf-8'));
7474
$emojiMap = array_fill_keys($orderedEmojis, null);
7575

7676
foreach ($files as $file) {

0 commit comments

Comments
 (0)
0