Comment

Comment by duskwuff

œ works fine with mb_strlen(). What might have been tripping you up is combining character sequences:

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.

parent duskwuff 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton