Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
CaptainRant458521h25 minutes later and I figured it out:
-> It's a UTF-8 combination character; one of those more modern extended set characters that requires you to type two Unicode characters together in order to be parsed:
/* solution */
let balloon = '\uD83C\uDF88';
Previous research:
https://fileformat.info/info/...
This tells me it is only supported by certain fonts, so I tried Segoe UI Emoji; no luck. charmap didn't show a balloon either.
https://emojipedia.org/balloon/...
emojipedia not much info.
Finally, emojiterra explains it:
https://emojiterra.com/balloon/
Good thing I read about it in an earlier book or I would have been a bit more lost. lol.
Question: does this emoji really need two UTF-8 codepoints or just one? lol -
Lensflare2094917hI think Swift and Rust might be the only main stream languages which get utf-8 right. -
retoor82716h
-
Lensflare2094914h@retoor I don’t mean utf-8 support in code. That even JS can do, as I pointed out.
What I mean is wrong counting of utf8 characters.
Go ahead and ask js or C how many characters "🎈" is. If it says it‘s more than 1, it’s wrong.
I had to intentionally make the character counting function broken in JoyRant to have the same counting as the devrant backend has.
And that is also the reason why link underlines are fucked up in JoyRant. -
retoor82714h@Lensflare i'm surprised it even compiled. But this is the way how to test that on C, don't even have to count:
```
retoor@retoor2:~$ gcc balloon.c
balloon.c: In function ‘main’:
balloon.c:4:20: warning: multi-character character constant [-Wmultichar]
4 | printf("%c\n", '🎈');
| ^~~~
retoor@retoor2:~$ ./a.out
�
```
tsoding has a nice episode out of this. -
Lensflare2094913h@retoor mentions seem to be broken again. shit.
This time I fear they might stay broken, like images. -
@Lensflare The web uses the HTTP protocol on top of the TCP protocol, where the point of the web is to transfer known resources between machines. In order to correctly serialize that data, you need UTF-8. I would say it is part of web fundamentals.
-
@CaptainRant not what I meant.
Learning how to use escaping to represent multi character emojis is not what I would call fundamental knowledge of how the web works or how web development works.
Related Rants

As a Python user and the fucking unicode mess, this is sooooo mean!
Unicode on a cup of joe
A true dev rant now: I find it difficult to get Unicode working. There is a nice assignment in a book where you have to insert a balloon emoji on the page.
Okay, easy enough. So I use <meta charset="UTF-8"> and then the HTML entity 🎈 which works, but then in JavaScript it doesn't work:
<div id="output"></div>
<script>
let balloon = '\u1F388';
document.getElementById("output").textContent = balloon;
</script>
Either I don't have the right font, or something else is going on.
And now more research. This is what I find cumbersome about Computer Science; hours stuck on one single thing. lol
rant
frontend
frustration
unicode