Repository navigation
fix: emoji sequence qualification - #9
Merged
Merged
Conversation
ensan-hcl
marked this pull request as ready for review
July 25, 2026 03:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Unicode Emojiの標準形に合わせて、生成される絵文字表層のコードポイント列を修正します。
背景・原因
apply_emoji_test_dataがemoji-test.txtのコードポイント列に対して種類を問わず末尾へU+FE0Fを追加していました。そのため、たとえば燃えるハートは標準の2764 FE0F 200D 1F525ではなく、末尾に余分なVariation Selectorを持つ2764 FE0F 200D 1F525 FE0Fとして生成されていました。一部の入力欄では許容される一方、LINEのスタンププレゼント画面にある友だち検索欄などではZWJ結合が崩れ、
❤️🔥が❤🔥として扱われる可能性があります。変更内容
fully-qualifiedとcomponentのコードポイント列を標準表層としてそのまま採用minimally-qualified/unqualifiedによる表層の上書きを停止U+FE0Fを除去apply_emoji_zwj_sequencesがグローバル変数へ依存していた引数名の不整合を修正影響
生成済み18ファイルの絵文字表層がUnicode Emojiの標準列になります。読み・キーワード・順序・variationデータに変更はありません。
確認
python3 -m unittest discover -s tests -v(4 tests passed)python scripts/emoji.pyによる全辞書再生成成功emoji-test.txtのfully-qualified/componentに一致することを確認U+FE0Fの除去のみであることを確認