title: Missing first character of fields in csv
body: <p>I'm working on a csv import script in php. It works fine, except for foreign characters in the beginning of a field. </p>
  
  <p>The code looks like this</p>
  
  <pre><code>if (($handle = fopen($filename, "r")) !== FALSE)
  {
       while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) 
           $teljing[] = $data;
  
       fclose($handle);
  }
  </code></pre>
  
  <p>Here is a data example showing my issue</p>
  
  <pre><code>føroyskir stavir, "Kr. 201,50"
  óvirkin ting, "Kr. 100,00"
  </code></pre>
  
  <p>This will result in the following</p>
  
  <pre><code>array 
  (
       [0] =&gt; array 
            (
                   [0] =&gt; 'føroyskir stavir',
                   [1] =&gt; 'Kr. 201,50'
            )
       [1] =&gt; array 
            (
                   [0] =&gt; 'virkin ting', &lt;--- Should be 'óvirkin ting'
                   [1] =&gt; 'Kr. 100,00'
            )
  )
  </code></pre>
  
  <p>I have seen this behaivior documented in some comments in php.net, and I have tried <code>ini_set('auto_detect_line_endings',TRUE);</code> to detect line endings. No success.</p>
  
  <p>Anyone familiar with this issue?</p>
  
  <p>Edit: </p>
  
  <p>Thanks you AJ, this issue is now solved.</p>
  
  <p><code>setlocale(LC_ALL, 'en_US.UTF-8');</code> </p>
  
  <p>Was the solution.</p>