Force download and charset - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Force download and charset (/showthread.php?tid=74060) |
Force download and charset - bastian - 07-17-2019 Hello community I'm fetching data from the database and create a CSV text file. I'd like to force download that file. With the download helper this works like a charm. The problem is, that die CSV file is encoded with UTF-8 (like the database). I needed the downloaded file to be encoded for ISO Latin 1. Is there a way to change the charset when using force_download() or do I have to create a download function on my own? Thanks for your help! RE: Force download and charset - InsiteFX - 07-17-2019 PHP.NET - mb_convert_encoding RE: Force download and charset - bastian - 07-17-2019 Thank you very much. I didn't know this function. |