Some emojis (e.g. ☁) have two unicode, u'\u2601' and u'\u2601\ufe0f'. What does u'\ufe0f' mean? Is it the same if I delete it?

后端 未结 2 951
失恋的感觉
失恋的感觉 2021-01-07 18:48

I\'m writing a python program to judge emoji with a collected emoji unicode set. During the test, I found that one emoji,take as an example, has two unicode,

2条回答
  •  有刺的猬
    2021-01-07 19:19

    In Unicode the value U+FE0F is called a variation selector. The variation selector in the case of emoji is to tell the system rendering the character how it should treat the value. That is, whether it should be treated as text, or as an image which could have additional properties, like color or animation.

    For emoji there are two different variation selectors that can be applied, U+FE0E and U+FE0F. U+FE0E specifies that the emoji should be presented like text. U+FE0F specifies that it should be presented as an image, with color and possible animation.

    Without the variation selector the character still renders fine, (just look at the page source at this character: ☁) but there's no additional information about presentation.

提交回复
热议问题