I build a webapp and one specific user uses a chef-emoji (https://emojipedia.org/de/koch#technical) in his username.
At some point in my code I need to get the length of his username string.
I noticed that in test-env 👨🍳.length is 5. (firefox 128.0.3)
In prod-env 👨🍳-length is 7. (firefox 115.13.0)
html charset is utf8.
How?
I read this
which wasn’t very new to me, and this
https://dmitripavlutin.com/what-every-javascript-developer-should-know-about-unicode/
which was quite interesting.
However, 👨🍳 consisting of 3 code points and two of them being surrogate pairs, I assume length of 5 should be the correct answer.
How ist the length 7 in prod-environment?