M
M
Mimocodil2021-04-24 18:15:21
Java
Mimocodil, 2021-04-24 18:15:21

How to make telegram bot display emoji flags?

At the start and when changing the language, the user is shown a dialog with buttons. I want to make a checkbox for each button.
This code returns the emoji from the code and for other emoji it works without issue (e.g. blue book, apple):
new String(Character.toChars(codePoint))
But when I try to give it a flag code... for example... USA (0x1F1FA, 0x1F1F2, 0x1F1F8), it gives me
6084352fb0532688517596.png
codes I take emoji from the site:
https://unicode.org/emoji/charts/full-emoji-list.html

So far I have only gotten to the point that, perhaps, telegram should somehow understand how exactly it should display what I send. Tell me how to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
leomovskii, 2021-05-31
@Ezekiel4

Flags are encoded with two characters. For example, 0x1F1FA + 0x1F1F8 (U.S. flag), or, 0x1F1FA + 0x1F1FF (Uzbekistan flag).
Select the desired flag in the telegram emoji list, copy and paste into the code as a string.

A
Andrey Shatokhin, 2021-04-24
@Sovigod

Telegram has nothing to do with it. It uses system emoji. This is how Windows draws them. You can check on Android/iOS - it will be much better there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question