title: Force encode from US-ASCII to UTF-8 (iconv)
body: <p>I'm trying to transcode a bunch of files from US-ASCII to UTF-8.</p>
  
  <p>For that, I'm using iconv:</p>
  
  <pre><code>iconv -f US-ASCII -t UTF-8 file.php &gt; file-utf8.php
  </code></pre>
  
  <p>My original files are US-ASCII encoded, which makes the conversion not happen. Apparently it occurs because ASCII is a subset of UTF-8...</p>
  
  <p><em><a href="http://www.linuxquestions.org/questions/linux-software-2/iconv-us-ascii-to-utf-8-or-iso-8859-15-a-705054/" rel="noreferrer">iconv US ASCII to UTF-8 or ISO-8859-15</a></em></p>
  
  <p>And quoting:</p>
  
  <blockquote>
    <p>There's no need for the textfile to appear otherwise until non-ASCII
    characters are introduced</p>
  </blockquote>
  
  <p>True. If I introduce a non-ASCII character in the file and save it, let's say with <a href="https://en.wikipedia.org/wiki/Eclipse_%28software%29" rel="noreferrer">Eclipse</a>, the file encoding (charset) is switched to UTF-8.</p>
  
  <p>In my case, I'd like to <strong>force iconv to transcode the files to UTF-8 anyway</strong>. Whether there is non-ASCII characters in it or not.</p>
  
  <p>Note: The reason is my PHP code (non-ASCII files...) is dealing with some non-ASCII string, which causes the strings not to be well interpreted (french):</p>
  
  <blockquote>
    <p>Il Ã©tait une fois... l'homme sÃ©rie animÃ©e mythique d'Albert</p>
    
    <p>BarillÃ© (Procidis), 1Ã¨re</p>
    
    <p>...</p>
  </blockquote>
  
  <ul>
  <li><code>US ASCII</code> -- <strong>is</strong> -- a subset of <code>UTF-8</code> (see <a href="https://stackoverflow.com/a/11303410/925307">Ned's answer</a> below)</li>
  <li>Meaning that US ASCII files <strong>are</strong> actually encoded in <code>UTF-8</code></li>
  <li>My problem came from somewhere else</li>
  </ul>