Answer the question
In order to leave comments, you need to log in
Why are the sizes of different VK emoticons different?
Good afternoon, I'm making a bot for VK. There is functionality associated with emoticons. I need to be able to use only 1 emoji.
if (smile.length === 1) {
...
}
Answer the question
In order to leave comments, you need to log in
Because emoticons are up to 4 bytes and utf8 mb4 encoding
https://stackoverflow.com/a/30074553/1603055
https://dev.to/coolgoose/quick-and-easy-way-of-cou...
https: //stackoverflow.com/a/25994411/1603055
Counting the length of strings in utf8 through length does not lead to the result that you expect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question