By fetching data from mysql table i am generating csv file and uploading to some ftp folder. But other person using this csv file from ftp side says that it is in ANSI encoding. How can i change that to UTF-8 encoding? For this I am using the below code.
header('Content-Encoding: utf-8');
header('Content-Type: text/csv; charset=utf-8');
$fh1 = fopen($current_csv_name, 'w+');
foreach($csv_data as $curl_response)
{
fputs($fh1, implode($curl_response, ';')."\n");
}
fclose($fh1);
When i download the file and open in notepad and click on save as it is always showing Encoding as ASNI. Where i am doing wrong? Any help would be greatly appreciated.