0

I'm trying to generate strings from the number Code found on http://www.unicode.org/emoji/charts/full-emoji-list.html#1f6b4 so I can set treeview nodes to show the emoji icons. Any clue how to do this. Here is what I tried but just displays a small rectangle.

        string emoji = "Face Savoring Food " + char.ConvertFromUtf32(0x1F60B);
        EmojiTreeView.Nodes.Add(emoji);
GRF
  • 171
  • 2
  • 10
  • You probably need to make sure the font supports that. – 001 May 14 '20 at 02:16
  • Please don't post the same question twice. If you need to provide more details, you can edit the original question which might give it a higher chance of getting reopen. – 41686d6564 stands w. Palestine May 14 '20 at 02:22
  • `string emoji = "Face Savoring Food \U0001F60B";` You need an Emoji-capable Font, as `Segoe UI Emoji`. – Jimi May 14 '20 at 02:34
  • @Jimi It actually [worked for me](https://stackoverflow.com/questions/61740366/how-to-translate-unicode-value-to-emoji-string-in-c#comment109290879_61740366) with pretty much every font I tried (Tahoma, Arial, Times New Roman, and others) for all the Unicode values that the OP provided. – 41686d6564 stands w. Palestine May 14 '20 at 03:00
  • 1
    @Ahmed Abdelhameed [Font fallback](https://stackoverflow.com/a/51612395/7444103) works better in some Systems and not so well in others. In Windows 7 (for example), Emoji support is much less *accomplished*, so you won't get a surrogate. It's just a guess though... – Jimi May 14 '20 at 03:08
  • 1
    Ah, I see now. That makes sense. I was thinking it could be a problem with older .NET versions but still couldn't reproduce. Didn't know it might be related to the system itself. Thanks, @Jimi! – 41686d6564 stands w. Palestine May 14 '20 at 03:16
  • 1
    @Jimi... That worked. Just left my code alone and changed the font to `Segoe UI Emoji`. Thanks SO much! – GRF May 14 '20 at 03:21
  • Does anyone know if this link is maintained in terms of all of the emojis available? https://unicode.org/emoji/charts/full-emoji-list.html – GRF May 14 '20 at 03:28

0 Answers0