So You Think You Can Unicode, Quiz #2

Update 2022-03-18: The prize goes to Shivam, who DM’d me the correct answer: 31 bytes. I’ll explain in the next post!

Another encoding-related quiz, this time with a prize: a $25 B&H gift card! Submit your answer in the comments.

You now know what maxlength actually counts in the browser: UTF-16 code units.

And you know what we typically think of as a “character” (grapheme cluster) doesn’t necessarily use just one code unit — it could be 2, 3, 4 or even more code units long.

For today, put aside the wackier stuff (complexions, genders, joiners, variation selectors). The Thumbs Up character is a simple Emoji, represented as 2 UTF-16 code units. The others are Basic Latin characters, taking 1 code unit each.  So there are a total of 17 code units in the Textarea:

Now the question: how many bytes are sent over the network to Marketo to represent the 17 × 16 bits in

G r e a t ⎵ p r o d u c t ! ⎵ 👍

and why?