Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
file_save_data is saving files with ANSI encoding. I want utf8. How can I specify encoding?
you do it with UTF8 add BOM
file_put_contents($File_name, "\xEF\xBB\xBF". $content);
Required, but never shown