Skip to content

Project avatar fallback doesn't support emoji characters #12441

Closed

Description

@aaranmcguire

Description

The avatar component's fallback (used for project icons) doesn't correctly display emoji characters. When a project name starts with an emoji like "😀MyProject", the avatar shows a broken character instead of the emoji.

Image Image

Root Cause

The avatar component uses split.fallback?.[0] to get the first character. JavaScript string indexing with [0] returns individual UTF-16 code units, but emojis use surrogate pairs (two code units). This means "😀"[0] returns only the first half of the surrogate pair, resulting in a broken character.

Regular Unicode characters like Chinese characters work fine because they fit in a single UTF-16 code unit.

Expected Behavior

Emojis should display correctly in avatar fallbacks, just like regular characters.

Activity

  1. aaranmcguire commented on Feb 10, 2026

    @aaranmcguire
    Author

    Closed to manually create it (so it has correct labels to be seen by humans)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions