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

Viewed 371

The Unicode entity:

U+2714 HEAVY CHECK MARK

Has different encodings:

  • UCS4: 0x00002714
  • UTF-16: 0x2714
  • UTF-8: 0xE2 0x9C 0x94
  • HTML Entity: ✔

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:

  • Text style: ✔ (U+2714+U+FE0E)
  • Emoji style: ✔️ (U+2714+U+FE0F)

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:

  • Text style: U+2714 U+FE0E
  • Emoji style: U+2714 U+FE0F

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

Which is to say, these fail:

  • &heavycheckmarkemojistyle;
  • �

what doesn't?

1 Answers

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

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