in mysql have set data field type utf8_bin
, storing data in unicode. texts being displayed in web pages.
i want generate excel file exporting data table it. output in .xls
, .cvs
- '????'.
i checkout out other answers here, been referred use headers:
header("content-type:application/csv;charset=utf-8");
similar question. not working. after using header, in csv output - सूरà¥à¤¯à¤¾.
please help. thanks.
this post solved problem -
https://stackoverflow.com/a/4762708/2349494
and did conversion -
print chr(255) . chr(254) . mb_convert_encoding($csv_output, 'utf-16le', 'utf-8');
earlier getting garbage characters correct data exported.
Comments
Post a Comment