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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -