r/ProgrammerHumor • • Oct 03 '26

Meme itsSoOver

Post image
6.3k Upvotes

95 comments sorted by

View all comments

Show parent comment

5

u/Robot_Graffiti Oct 03 '26

Lol unfortunately for you there are more 2 byte enjoyers, or perhaps toleraters, than anyone would like.

For goofy historical reasons, the Windows API, Java, C# and JavaScript all use UTF-16 for in-memory strings. A JavaScript "character" is two bytes but that's not necessarily an actual visible character; a visible character could be 2 "characters" long if it's from East Asia or more if it's an emoji.