How to export data in CSV DOS/Windows format
Solved
sipherion
Posted messages
1836
Registration date
Status
Member
Last intervention
-
ryko1820 Posted messages 1633 Registration date Status Member Last intervention -
ryko1820 Posted messages 1633 Registration date Status Member Last intervention -
Hello to all PHP enthusiasts,
I have an app where I need to import a CSV in Dos\Windows format, but when I export from an app I developed, I get it in Macintosh format, so the import doesn't work correctly.
My headers:
Notepad++ tells me that my export is Macintosh, and when I export from the other tool, it is indeed in Dos\Windows format.
How can I do a Dos\Windows export in CSV?
Thank you for your help
"It's better to know everything to look for than to try to know everything."
I have an app where I need to import a CSV in Dos\Windows format, but when I export from an app I developed, I get it in Macintosh format, so the import doesn't work correctly.
My headers:
header('Content-Encoding: UTF-8'); header('Content-type: text/csv; charset=UTF-8'); header('Content-Disposition: attachment; filename="agents_list.csv"'); Notepad++ tells me that my export is Macintosh, and when I export from the other tool, it is indeed in Dos\Windows format.
How can I do a Dos\Windows export in CSV?
Thank you for your help
"It's better to know everything to look for than to try to know everything."
3 answers
Hello,
maybe a BOM story (UTF-8 with or without :: Notepad++ can see it, I believe) or perhaps switch to WINDOWS-1252 encoding.
You may stop me but you can't stop us all ;-)
maybe a BOM story (UTF-8 with or without :: Notepad++ can see it, I believe) or perhaps switch to WINDOWS-1252 encoding.
You may stop me but you can't stop us all ;-)