title: How to convert the character encoding of string to UTF-8 from any encoding in PHP?
body: <p>I need to convert the character encoding of string str to UTF-8 from any encoding in PHP.</p>
  
  <p>This code:
  $string = mb_convert_encoding($sring, "utf-8", "auto");
  sometimes returns warning: "mb_convert_encoding(): Unable to detect character encoding"</p>