Ian Boyd
Ian Boyd

Reputation: 257095

How to specify emoji version of a Unicode character in HTML?

The Unicode entity:

U+2714 HEAVY CHECK MARK

Has different encodings:

And that is all well and good. And if you have a Unicode file with that encoded character:

Offset    00 01 02 03
00000000: FF FE 14 27

it renders as the HEAVY CHECK MARK if you open it in a browser:

              enter image description here

But that's not the only U+2714

There is another U+2714. There are two styles of U+2714:

And if put that second style, the Emoji style, into a text file:

Offset    00 01 02 03 04 05
00000000: FF FE 14 27 0F FE

it renders in a browser as HEAVY CHECK MARK but this time in Emoji style:

             enter image description here

How to encode that in HTML

Given the options are:

How do HTML encode that so that it shows up as U+2714 HEAVY CHECK MARK EMOJI STYLE?

Which is to say, these fail:

what doesn't?

Upvotes: 5

Views: 3115

Answers (1)

Bill
Bill

Reputation: 1659

I think you just specify the "emoji version" as a second entity. Like this:

<p>
 &#x2714;<br/>
 &#x2714;&#xfe0f;<br/>
</p>

jsFiddle

Upvotes: 3

Related Questions