Handling strings properly usually goes in line with understanding the core concepts of Unicode. At the beginning characters were just bytes, then they became code points, and finally, they can be combined into grapheme clusters. Whether you like it or not, that's three-unit systems we have to deal with as programmers if we want cultures to be able to communicate using computers.
Gathered from my work on the patchwork/utf8 library, my experience on the topic has now been ported to Symfony String, a component that provides a unified API for all 3 systems.