I\'ve got this very simple thing that just outputs some stuff in CSV format, but it\'s got to be UTF-8. I open this file in TextEdit or TextMate or Dreamweaver and it displa
Add:
fprintf($file, chr(0xEF).chr(0xBB).chr(0xBF));
Or:
fprintf($file, "\xEF\xBB\xBF");
Before writing any content to CSV file.
Example: