Display Foreign Languages In CSV File
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/279170/utf-8-all-the-way-through">UTF-8 all the way through</a>  </p>
</blockquote>



<p>I created script which creates <code>CSV</code> for selected <code>PHP</code> file that <code>PHP</code> file contains content for different language. My script generates correct CSV file but for other language the CSV file contains unreadable text. </p>

<p><strong>Header part of PHP to CSV Script</strong></p>

<pre><code>// Send to browser to download
header("Content-Disposition: attachment; filename=$csvFile");
header("Content-Type: application/csv");
readfile("$csvFile");
</code></pre>

<p>I also tried </p>

<pre><code>header("encoding: utf-8");
</code></pre>

<p>and</p>

<pre><code>header("charset: utf-8");
</code></pre>

<p>very strange I used array variable and store CZ language then csv generate correct format, it seems that while reading content from php file it convert Foreign language text into mess text because I print_r content array &amp; yap it is messed. Now point move to why content is getting mess while reading from php file?</p>
