mb_convert_encoding error: Call to undefined function mb_convert_encoding()
<p>I am currently writing a PHP function but when the complete script is executed I am getting an error:</p>

<p>Error:</p>

<pre><code>Call to undefined function mb_convert_encoding() 
</code></pre>

<p>My function:</p>

<pre><code>function cleanData(&amp;$str)
  {
   if($str == 't') $str = 'TRUE';
   if($str == 'f') $str = 'FALSE';
   if(preg_match("/^0/", $str) || preg_match("/^\+?\d{8,}$/", $str) || preg_match("/^\d{4}.\d{1,2}.\d{1,2}/", $str)) {
   $str = "'$str";
  }
  if(strstr($str, '"')) $str = '"' . str_replace('"', '""', $str) . '"';
  $str = mb_convert_encoding($str, 'ISO-8859-1','utf-8');
}
</code></pre>

<p>Can anyone see where I am going wrong. Many thanks in advance for your time.</p>

<p>Cheers</p>