3

How can i write a file in PHP with encode ISO-8859-1?

Im using the function

$file = fopen("file.txt", "a");

When the file is created, it appears with encoding UTF-8 and i want it in ISO-8859-1.

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
juanmiguel431
  • 79
  • 2
  • 11

1 Answers1

-7

UTF-8 supports all the characters found in ISO-8859-1... it's best to stick with UTF-8 as it supports the most amount of characters commonly used and will give you the least amount of problems.

TravisO
  • 9,406
  • 4
  • 36
  • 44