Differences

This shows you the differences between two versions of the page.

Link to this comparison view

php_unicode [2012/05/17 16:57] (current)
Line 1: Line 1:
 +====== PHP Unicode ======
  
 +  * [[PHP]]
 +
 +==== fgetcsv ====
 +
 +The ''​fgetcsv''​ function in PHP will truncate data if it has one-byte characters. ​ A fix:
 +
 +<​code>​
 +while ($data = fgetcsv($handle,​ $line_max, ','​)) {
 +     $data = array_map(utf8_encode,​ $data);
 +}
 +</​code>​