title: mb_detect_encoding detects ASCII as UTF-8?
body: <p>I'm trying to automatically convert imported IPTC metadata from images to UTF-8 for storage in a database based on the PHP <code>mb_</code> functions.<br></p>
  
  <p>Currently it looks like this:</p>
  
  <pre><code>$val = mb_convert_encoding($val, 'UTF-8', mb_detect_encoding($val));
  </code></pre>
  
  <p>However, when <code>mb_detect_encoding()</code> is supplied an ASCII string (special characters in the Latin1-fields from 192-255) it detects it as UTF-8, hence in the following attempt to convert everything to proper UTF-8 all special characters are removed.</p>
  
  <p>I tried writing my own method by looking for Latin1 values and if none occured I would go on to letting <code>mb_detect_encoding</code> decide what it is. But I stopped midway when I realized that I can't be sure that other encoding don't use the same byte values for other things.</p>
  
  <p>So, is there a way to properly detect ASCII to feed to <code>mb_convert_encoding</code> as the source encoding?</p>