Make WordPress Core

Opened 8 months ago

Last modified 5 months ago

#63451 new defect (bug)

Flag emoji rendering issue on Windows environment

Reported by: kimjiwoon's profile kimjiwoon Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Emoji Keywords: close
Focuses: Cc:

Description (last modified by dd32)

Title:
Flag emoji rendering issue on Windows environment

Description:
On WordPress, flag emojis for England (๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ), Scotland (๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ), and Wales (๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ) do not render correctly in Windows environments. Instead of showing their respective flag designs, they are displayed as a plain black flag (๐Ÿด).

On mobile devices (such as Android or iOS), these flag emojis render properly as intended using either system emojis or Twemoji fallback. However, on Windows 10/11 desktop systems, particularly with the Segoe UI Emoji font, the emoji tag sequences required for these regional flags are not supported, causing them to appear as a generic black flag.

Steps to Reproduce:

  1. Post a comment or content on a WordPress site containing these emojis:
  • ๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ (England)
  • ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ (Scotland)
  • ๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ (Wales)
  1. View the page on:
  • Mobile (Android/iOS) โ†’ Emoji display correctly
  • Windows 10/11 desktop โ†’ Displays as ๐Ÿด black flag

Expected Result:
England, Scotland, and Wales flag emojis should render properly across platforms, or at least gracefully fallback via Twemoji when system font support is lacking.

Actual Result:
On Windows, all three flag emojis appear as ๐Ÿด.

Additional Info:

  • Confirmed on latest WordPress.com and WordPress.org self-hosted sites.
  • Twemoji appears to correctly render these on other platforms like Mastodon, X.com (Twitter), and Misskey.
  • Possible workaround: Ensure Twemoji or another fallback emoji library handles emoji tag sequences on desktop platforms where system fonts lack support.

Related Links:

โ€‹https://wordpress.com/support/emoji/
โ€‹https://x.com/thaumiel999/status/1923038246533001630
โ€‹https://mastodon.social/@thaumiel999/114512564948217544
โ€‹https://misskey.io/notes/a7t3kaiafyr70boz
โ€‹https://kimjiwoon96.wordpress.com/2025/02/16/%EC%95%84%ED%8C%8C%ED%8A%B8-%EC%98%A5%EC%83%81/comment-page-1/#comment-54

Attachments (1)

Screenshot 2025-08-12 at 10.22.09โ€ฏam.pngโ€‹ (20.5 KB) - added by peterwilsoncc 5 months ago.

Download all attachments as: .zip

Change History (10)

#1 in reply to: โ†‘ย description @canmerkat
5 months ago

I have had the same problem with Twenty Twenty as well. I remove the flag now on my post and watching ticket to be solved. Please check the screenshot. โ€‹https://prnt.sc/9mfA7a4CjNAI

Replying to kimjiwoon:

Title:
Flag emoji rendering issue on Windows environment

Description:
On WordPress, flag emojis for England (๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ), Scotland (๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ), and Wales (๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ) do not render correctly in Windows environments. Instead of showing their respective flag designs, they are displayed as a plain black flag (๐Ÿด).

On mobile devices (such as Android or iOS), these flag emojis render properly as intended using either system emojis or Twemoji fallback. However, on Windows 10/11 desktop systems, particularly with the Segoe UI Emoji font, the emoji tag sequences required for these regional flags are not supported, causing them to appear as a generic black flag.

Steps to Reproduce:

  1. Post a comment or content on a WordPress site containing these emojis:
  • ๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ (England)
  • ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ (Scotland)
  • ๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ (Wales)
  1. View the page on:
  • Mobile (Android/iOS) โ†’ Emoji display correctly
  • Windows 10/11 desktop โ†’ Displays as ๐Ÿด black flag

Expected Result:
England, Scotland, and Wales flag emojis should render properly across platforms, or at least gracefully fallback via Twemoji when system font support is lacking.

Actual Result:
On Windows, all three flag emojis appear as ๐Ÿด.

Additional Info:

  • Confirmed on latest WordPress.com and WordPress.org self-hosted sites.
  • Twemoji appears to correctly render these on other platforms like Mastodon, X.com (Twitter), and Misskey.
  • Possible workaround: Ensure Twemoji or another fallback emoji library handles emoji tag sequences on desktop platforms where system fonts lack support.

Related Links:

โ€‹https://wordpress.com/support/emoji/
โ€‹https://x.com/thaumiel999/status/1923038246533001630
โ€‹https://mastodon.social/@thaumiel999/114512564948217544
โ€‹https://misskey.io/notes/a7t3kaiafyr70boz
โ€‹https://kimjiwoon96.wordpress.com/2025/02/16/%EC%95%84%ED%8C%8C%ED%8A%B8-%EC%98%A5%EC%83%81/comment-page-1/#comment-54

Last edited 5 months ago by canmerkat (previous) (diff)

#2 @dd32
5 months ago

  • Description modified (diff)

This was rendering all Black flags everywhere, I think the emoji's were all black flag rather than the intended country flags. I've edited it to use the correct emoji flags for testing.

#3 @dd32
5 months ago

I couldn't duplicate this on Windows 10 Pro with Edge & Chrome.

Creating a post from Mac and viewing in Windows resulted in twemoji fallbacks.

Commenting with an emoji showed the black flag in places where the system font is used (Within the textbox) but posted as the emoji and twemoji kicked in for the comment preview.

#4 @peterwilsoncc
5 months ago

Reproduction Report

Description

I've attempted to reproduce this without success.

Using Chrome 139 on Windows 10 (via Browserstack), the emoji initially render as black flags due to a lack of system support but are subsequently replaced with the Twemoji images when rendered on the front end of the site.

In the Block editor the Twemoji script doesn't run so the render as black flags there but not for readers of the site.

@kimjiwoon if you're seeing this issue on the front-end of the site, are you able to provide further details about the browser and operating system versions?

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.3.23
  • Server: nginx/1.18.0
  • Database: mysqli (Server: 8.0.36-0ubuntu0.22.04.1 / Client: mysqlnd 8.3.23)
  • Browser: Chrome 139.0.0.0 via BrowserStack
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.3
  • MU Plugins:
    • cpt-test.php
    • _admin_bar_show_cache.php
    • _qm-mappings.php
  • Plugins:
    • Query Monitor 3.19.0
    • Test Reports 1.2.0

Actual Results

Unable to reproduce

Supplemental Artifacts

See Screenshot 2025-08-12 at 10.22.09โ€ฏam.pngโ€‹

#5 @kimjiwoon
5 months ago

Reply to @peterwilsoncc

The issue appears to be resolved on my WordPress sites โ€” the England, Scotland, and Wales flags are now rendering correctly on Windows where they previously appeared as ๐Ÿด black flags.

However, in the WordPress Core Trac interface, these emojis still render as black flags on Windows.
This suggests the fix may be environment-specific (possibly front-end Twemoji fallback working, but not in Trac's rendering).

Were there any related patches in the past three months?
Could the recent ActivityPub plugin patch regarding multibyte character handling be related?
Reference: [wordpress-activitypub/pull/1995](โ€‹https://github.com/Automattic/wordpress-activitypub/pull/1995)

---
๊ทธ ํ๋ฆ„์ด๋ฉด ์ด๋ ‡๊ฒŒ ์ •๋ฆฌํ•ด์„œ ๋ณด๊ณ ํ•˜๋Š” ๊ฒŒ ๊น”๋”ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

---

Tested with the following flag emojis using ActivityPub and Mastodon:

Steps:

  1. Posted a comment from Mastodon to a WordPress site with ActivityPub enabled โ†’ emojis rendered correctly on the front-end.
  2. Copied the same comment content and posted it manually on a self-hosted WordPress site โ†’ emojis rendered correctly as well.

This suggests that at least in front-end rendering (both ActivityPub-federated and manual comment posts), Twemoji fallback works properly now.

However:

  • In WordPress Core Trac, the same flag emojis still render as ๐Ÿด black flags on Windows.
  • Possibly unrelated, but on WordPress.com the block editor is enabled for comments, and when inserting these emojis there, they are sometimes added as image elements instead of Unicode characters.

---

Version 0, edited 5 months ago by kimjiwoon (next)

#6 @kimjiwoon
5 months ago

โ€‹https://github.com/wordpress-mobile/WordPress-iOS/issues/24551
โ€‹https://wordpress.slack.com/archives/C02RQBWTW/p1747561489611609
This is something I posted in the Core channel on Slack about three months ago, and as you can see from the attached file, the issue did exist.
If the bug has been fixed but no one knows why, that in itself seems like a problem.
Moreover, it doesnโ€™t appear to be fully resolvedโ€”based on other usersโ€™ cases, the issue still seems to persist.
โ€‹https://wordpress.slack.com/archives/C02RQBWTW/p1755169123544069?thread_ts=1747561489.611609&cid=C02RQBWTW

Last edited 5 months ago by kimjiwoon (previous) (diff)

This ticket was mentioned in โ€‹Slack in #core by kimjiwoon. โ€‹View the logs.


5 months ago

#8 follow-up: @swissspidy
5 months ago

  • Keywords close added

In WordPress Core Trac, the same flag emojis still render as ๐Ÿด black flags on Windows.

Trac doesn't use Twemoji, so that sounds as expected.

Possibly unrelated, but on WordPress.com the block editor is enabled for comments, and when inserting these emojis there, they are sometimes added as image elements instead of Unicode characters.

It sounds like you were possibly copying a Twemoji image. If it can be reproduced outside of WordPress.com (e.g. in Gutenberg Playground), I suggest opening an issue on Gutenberg. Otherwise, report it to WordPress.com.

#9 in reply to: โ†‘ย 8 @siliconforks
5 months ago

Replying to swissspidy:

Trac doesn't use Twemoji, so that sounds as expected.

Trac does in fact use Twemoji - see the previous discussion here. It might not be loaded in some browsers, though.

Note: See TracTickets for help on using tickets.