4 ms·
œ works fine with mb_strlen(). What might have been tripping you up is combining character sequences: https://3v4l.org/DM4pC https://3v4l.org/DM4pC Handling t
by duskwuff 6y ago
œ works fine with mb_strlen(). What might have been tripping you up is combining character sequences:
https://3v4l.org/DM4pC https://3v4l.org/DM4pC
Handling those "correctly" with a string length function gets complicated in any language, as there isn't a 1-to-1 mapping between Unicode codepoints and visible glyphs.
- electrotype 6y agoYes, I think you nailed what my issue was.
- njuw 6y agoIn PHP grapheme_strlen achieves what you're describing: https://3v4l.org/HPOb3 https://3v4l.org/HPOb3