DEV Community

Cover image for Emoji Error in Chrome Extension HTML
Sung M. Kim
Sung M. Kim

Posted on • Originally published at slightedgecoder.com on

2

Emoji Error in Chrome Extension HTML

                    Photo by Bernard Hermant on Unsplash

I’ve had a problem where I was trying to display an Emoji in a Chrome Extension header of default popup HTML, page_action.html (specified by page_action -> default_popup in manifest.json).

But got the jumbled up characters instead.

Emoji displayed as gobbledygook
Emoji displayed as gobbledygook

The problem was that I had to instruct Chrome that I am using a unicode by adding a charset meta tag.

<html>
<head>
<meta charset="UTF-8" />
...
</head>
...
</html>
view raw meta.html hosted with ❤ by GitHub
Character Set set to UTF-8

This has fixed the issue and shows the cute 🐥 emoji correctly in the Chrome Extension popup.

You can now see the cute baby chick
You can now see the cute baby chick 🐥

The post Emoji Error in Chrome Extension HTML appeared first on Sung's Technical Blog.

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more