title: Alternative for htmlentities($string,ENT_SUBSTITUTE)
body: <p>I got a bit of a stupid question;</p>
  
  <p>Currently I am making a website for a company on a server which actually has a bit an outdated PHP version (5.2.17). I have a database in which many fields are varchar with characters like '<em>é ä è ê</em>' and so on, which I have to display in an HTML page.</p>
  
  <p>So as the version of PHP is outdated (and I am not allowed to updated it because there are parts of the site that must keep working and to whom I have no acces to edit them) I can't use the htmlentities function with the ENT_SUBSTITUTE argument, because it was only added after version 5.4.</p>
  
  <p>So my question is: </p>
  
  <blockquote>
    <p>Does there exist an alternative to
    <strong>htmlentities($string,ENT_SUBSTITUTE);</strong> or do I have to write a function
    myself with all kinds of strange characters, which would be incomplete anyway.</p>
  </blockquote>