I made a PHP script that generates CSV files that were previously generated by another process.
And then, the CSV files have to be imported by yet another process.
Try changing your PHP script to UTF-8 too. Sometimes it is necessary (despite it can be bypassed) to have the script in the same char encoding of the data.
Similar problem: PHP: Explode using special characters