megetron Posted March 8, 2012 Share Posted March 8, 2012 Hello, I am trying to export data from database. the exported data is creted with wrong encoding. I am using this code: header("Pragma: public"); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application/force-download;charset=utf-8; encoding=UTF-8"); header('Content-Disposition: attachment; filename="'.$newFile.'"'); header("Content-Transfer-Encoding: binary"); header('Content-Length: '.@filesize($path)); Please help with the encoding. Thanks. Link to comment https://forums.phpfreaks.com/topic/258561-how-to-exportt-encoded-utf-8-csv/ Share on other sites More sharing options...
megetron Posted March 9, 2012 Author Share Posted March 9, 2012 no one? Link to comment https://forums.phpfreaks.com/topic/258561-how-to-exportt-encoded-utf-8-csv/#findComment-1325614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.