I just want to ask a really confusing question and get a really basic answer to how it all works, basically my problem is when I count character lengths in JavaScript and PHP for symbols and emoji's like ❤️ it comes up 11 characters instead of what I think is 1 in its 'true length'.
I would like the code for PHP and JavaScript to simply count the 'true length' a human would see for EVERY character readable by a computer (if that makes sense), so all UTF-8 symbols/characters and emojis.
I've tried using strlen, but that only counts bytes, not characters I think. I've also tried mb_strlen but that doesn't count the true length for emojis.
Thank you, I would also appreciate a simple explanation of how this encoding/unicode system works for different length characters, taking into account characters from other languages e.g. french/hebrew.
Cheers!