variation_selector
- mautrix.util.variation_selector.add(val)
Add emoji variation selectors (16) to all emojis that have multiple forms in the given string. This will remove all variation selectors first to make sure it doesn’t add duplicates.
New in version 0.12.5.
Examples
>>> from mautrix.util import variation_selector >>> variation_selector.add("\U0001f44d") "\U0001f44d\ufe0f" >>> variation_selector.add("\U0001f44d\ufe0f") "\U0001f44d\ufe0f" >>> variation_selector.add("4\u20e3") "4\ufe0f\u20e3" >>> variation_selector.add("\U0001f9d0") "\U0001f9d0"
- mautrix.util.variation_selector.remove(val)
Remove all emoji variation selectors in the given string.
New in version 0.12.5.
- mautrix.util.variation_selector.read_data()
Get the list of emoji that need a variation selector. This loads the local data file that was previously generated from the Unicode spec data files.