According to this answer, UTF-8 encoded characters used to have a byte limit of 6
but have since been limited to 4
. Some comments and answers in that post suggest that it's possible, maybe just in theory, to produce UTF-8 characters beyond 6 bytes. All that said, can the iOS keyboard produce a 6-byte UTF-8 character? What is the biggest UTF-8 character that the iOS keyboard can produce and how would one determine that? And do these limits apply to both what the keyboard can output and what the user can copy and paste into a text field?
Many Emoji characters are 8-bytes in UTF-8. For example, all the country flag Emojis are 8 bytes in UTF-8 encoding. This is because the flag Emojis are actually comprised of 2 Unicode characters each.
Some of the "people" Emojis are over 8 bytes in UTF-8 encoding. For example (picked at random), the "man vampire", character "U+1F9DB U+200D U+2642 U+FE0F" (that's 4 Unicode characters), is "F0 9F A7 9B E2 80 8D E2 99 82 EF B8 8F" in UTF-8 encoding.
So yes, a single Emoji character can produce a UTF-8 encoding that is over 4 bytes.
Technically a single Unicode character is 6 bytes or less but many characters that can be entered on an iOS keyboard, such as many Emoji symbols) are actually made of multiple Unicode characters which allows the UTF-8 encoding of these symbols to be well over 4 or 6 bytes.