PHP export to excel
- by user1865240
I'm having a trouble that I can't export japanese texts to excel (xls).
I used the following codes:
header('Content-type: application/ms-excel;charset=UTF-8');
header('Content-Disposition: attachment; filename='.$filename);
header("Pragma: no-cache");
echo $contents;
But in the excel file, the text changed to funny characters like this:
é™?定ç‰? ã?¨ã??ã?¯ã??ã?£ã?†ã?ªã?¢å??犬ã?®ã?Œæ??ã?
’è??ã??ã?Ÿã?†ã?£ã??ã??ã??ã?? ï??
Currently, I'm using hostingmanager and I tried on the different server using the same codes and there's no problem.
What could be the problem. Because of the PHP version??
Please help me.
Thank you,
Aino