ZWJ Emoji (like "Ninja Cat") cannot be used in Icon field #11802

Open
opened 2026-01-31 02:57:54 +00:00 by claunia · 5 comments
Owner

Originally created by @jrabbit on GitHub (Dec 14, 2020).

I can't set my icon to 🐱‍💻 but 🤖 works as expected. in terminal-preview.

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):
 Win32NT             10.0.19042.0 Microsoft Windows NT 10.0.19042.0
Any other software?

Steps to reproduce

Set Icon property to a fancy zwj emoji.

Expected behavior

Icon should be the emoji.

Actual behavior

json doesn't validate

Originally created by @jrabbit on GitHub (Dec 14, 2020). I can't set my icon to 🐱‍💻 but 🤖 works as expected. in terminal-preview. <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Windows Terminal version (if applicable): Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 Any other software? ``` # Steps to reproduce Set Icon property to a fancy zwj emoji. <!-- A description of how to trigger this bug. --> # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> Icon should be the emoji. # Actual behavior json doesn't validate <!-- What's actually happening? -->
claunia added the Area-SettingsIssue-BugPriority-3Product-Terminal labels 2026-01-31 02:57:55 +00:00
Author
Owner

@skyline75489 commented on GitHub (Dec 14, 2020):

Yeah you're right. Right now the restriction for emoji strings are very strict. See:

b80a4e45cc/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp (L114)

We need a better way to detect complicated emojis.

@skyline75489 commented on GitHub (Dec 14, 2020): Yeah you're right. Right now the restriction for emoji strings are very strict. See: https://github.com/microsoft/terminal/blob/b80a4e45cce0a9cb47e5bb1ad51f86eb84e59471/src/cascadia/TerminalSettingsModel/IconPathConverter.cpp#L114 We need a better way to detect complicated emojis.
Author
Owner

@zadjii-msft commented on GitHub (Dec 14, 2020):

Yep that's a good point. I wonder if ZWJ emoji will actually work as a FonIcon 😬

Oh, no they won't
image

So we'll need to file this upstream on WinUI

EDIT: NEVERMIND I'M DAFT.

<muxc:FontIconSource FontFamily="Segoe UI"  Glyph="🐱‍💻" />

image

The icon doesn't use font fallback, it needs to be told FontFamily="Segoe UI" explicitly.

@zadjii-msft commented on GitHub (Dec 14, 2020): Yep that's a good point. I wonder if ZWJ emoji will actually work as a `FonIcon` 😬 Oh, no they won't ![image](https://user-images.githubusercontent.com/18356694/102077717-5a73df80-3dcf-11eb-9d73-57637302f62c.png) ~~So we'll need to file this upstream on WinUI~~ EDIT: NEVERMIND I'M DAFT. ```xaml <muxc:FontIconSource FontFamily="Segoe UI" Glyph="🐱‍💻" /> ``` ![image](https://user-images.githubusercontent.com/18356694/102078218-28af4880-3dd0-11eb-973c-fde3484d4c4d.png) The icon doesn't use font fallback, it needs to be told `FontFamily="Segoe UI"` explicitly.
Author
Owner

@skyline75489 commented on GitHub (Dec 16, 2020):

So ZWJ emojis can be very long and take up to about 8 wchars, according to emoji-zwj-sequences. Guess length check isn't going to suffice. I wonder if this can be an early adopter of the Unicode handling work by @reli-msft .

@skyline75489 commented on GitHub (Dec 16, 2020): So ZWJ emojis can be very long and take up to about 8 wchars, according to [emoji-zwj-sequences](https://unicode.org/emoji/charts/emoji-zwj-sequences.html). Guess length check isn't going to suffice. I wonder if this can be an early adopter of the Unicode handling work by @reli-msft .
Author
Owner

@fitojb commented on GitHub (Feb 9, 2022):

The Windows 11 emoji set no longer supports the ninja cat sequences, so this issue may be considered moot now

@fitojb commented on GitHub (Feb 9, 2022): The Windows 11 emoji set no longer supports the ninja cat sequences, so this issue may be considered moot now
Author
Owner

@DHowett commented on GitHub (Feb 9, 2022):

Nah, we should still make sure we support these. Important emoji like "Woman whose skin is not yellow" are ZWJ-joined as well. 😄

@DHowett commented on GitHub (Feb 9, 2022): Nah, we should still make sure we support these. Important emoji like "Woman whose skin is not yellow" are ZWJ-joined as well. :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11802