<?php
$str = "French for French is français";
$str = html_entity_decode($str);
$str = substr($str, 0, 27);
echo htmlentities($str);
//$str contains "French for French is frança";
//example 2
$str = "the en dash looks like –";
$str = html_entity_decode($str);
$str = substr($str, 0, 25);
echo htmlentities($str);