Libgrapheme: A simple freestanding C99 library for Unicode
I&#x27;ve been trying to get into C this past week, and this is a great coincidence to see this today! I was just thinking how convenient it is to type emojis right into strings in Python and print them. I assumed C didn&#x27;t have much unicode compatibility, though I didn&#x27;t research it.<p>I gave libgrapheme a try, and it compiled just as the instructions said it would. The hello-world program also mostly worked, but in my terminal it malformed several things. For example the American flag emoji rendered in my terminal as [U][S], and the family emoji rendered as three distinct emoji faces (side-by-side) rather than one grouped one.<p>I went to a website that lets me copy emojis to my clipboard, and I directly copy-pasted the American flag into my terminal, and I still got [U][S], so I think the problem is just with the terminal and not the library.<p>edit: Indeed, this is a problem in Gnome terminal. I found a Bugzilla link[0] that is still open. The official name for the grouped emoji type is &quot;ZWJ sequence&quot;[1], short for Zero-Width Joiner, and it appears not a lot of terminals support them. If anyone knows of a good one for Linux, please let me know!<p>Great stuff, thank you for sharing!<p>References:<p>[0]: <a href="https:&#x2F;&#x2F;gitlab.gnome.org&#x2F;GNOME&#x2F;vte&#x2F;-&#x2F;issues&#x2F;2317" rel="nofollow">https:&#x2F;&#x2F;gitlab.gnome.org&#x2F;GNOME&#x2F;vte&#x2F;-&#x2F;issues&#x2F;2317</a><p>[1]: <a href="https:&#x2F;&#x2F;emojipedia.org&#x2F;emoji-zwj-sequence&#x2F;" rel="nofollow">https:&#x2F;&#x2F;emojipedia.org&#x2F;emoji-zwj-sequence&#x2F;</a>