I have a string that was being truncated for titles in a blog and this worked fine on the whole via the PHP built in function mb_strimwidth().
Then suddenly the user made a post on the website in question that had a title which included an apostrophe.
The apostrophe is being output as ’ and the problem is that the character length of the title string in this particular example came just into the middle of this 7 character apostrophe special chr.
So the title ended up appearing on the site as something like...
This is a test title to show you how the apostrophe was being cut in half R
Is there a strategy to still use mb_strimwidth() whilst avoiding this kind of situation ?