I have my application on WAMP installation with PHP 5.4, which is fully configured with UTF-8.
Now let me one. It is necessary to create CCV files. I should be encoded IOS-8859-1 for requirements beyond my control.
These are very small tables and I
iconv ("UTF-8", "ISO-8859-1 // TRANSLIT", $ every_data);
Then I am downloading this file:
header-type: text / csv; Charset = ISO-885 9-1 '); Header ('content-dispute: attachement; filename =' '. $ Filename.' ''; '); Counterpart $ string_with_all_data; Exit (0);
Well, there is no problem with my development server, the file is designed as a need. But the CSC generated in the production server includes UTF-8 BOM.
In principle the two servers are the same. However, in an introduction ( ï »¿) generates a CSV with the infamous 3 letters and no other. Both CSV ISO-8859-1 are correctly encoded.
I have tried one thousand variables, but the results always differ in both files (Fputcsv, ob_start (), content-type: bla-bla, etc ...)
< P> I suppos there is some difference in php or apache configuration that the output will change, but I can not find it.
No comments:
Post a Comment