0

file_save_data is saving files with ANSI encoding. I want utf8. How can I specify encoding?

0

you do it with UTF8 add BOM

file_put_contents($File_name, "\xEF\xBB\xBF".  $content); 
  • Thx, but can I do this with Drupal file_save_data? – giorgio79 Aug 3 '15 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.