The fgetcsv function in PHP will truncate data if it has one-byte characters. A fix:
fgetcsv
while ($data = fgetcsv($handle, $line_max, ',')) { $data = array_map(utf8_encode, $data); }