German characters not showing properly on csv file using php -


i trying generate csv file, gets created except german characters ä,ë,ï,etc information $data variable , tried use:

utf8_encode($data); 

but weird text, here headers file:

header("content-type: application/octet-stream");         header("content-disposition: attachment; filename=\"file1.csv\""); 

i have tried using iconv(); no luck far.

edit

just noticed $data utf-8 removed utf8_encode(); still, when try print ?

and changed header to:

 header("content-type: text/plain; charset=utf-8"); 

use:

header("content-type: text/plain; charset=utf-8"); 

and make sure $data isn't utf-8!


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -