My hosting service recently upgraded my website server from PHP 5.3 to 5.6 and it broke my site in that all my html/php files are ISO-8859-1 but the site is now being served up with response headers indicating
charset=UTF-8
I understand I should move to UTF-8 files eventually but in the meantime I want a quick-fix. I've tried the following fixes:
<meta charset="ISO-8859-1"> (in the <head> tag of html files)
AddDefaultCharset ISO-8859-1 (in .htaccess)
default_charset= "ISO-8859-1" (in php.ini)
...but none of these affected the response header charset.
The only thing that worked in testing was adding this line to my header.php file used by most (not all) of my pages:
header('Content-Type: charset=ISO-8859-1');
But I don't want to hunt through all the straggler files and add that to each. I might as well convert all the files to UTF-8 if I'm going to hunt them and touch them in that way.
So...I was wondering if anyone would know why my PHP.ini or htaccess fixes don't do the job universally? Does the fact that these are not working indicate that some other Apache setting is in control of the response header for charset?
Thanks in advance.
Update: I even tried adding
addCharset ISO-8859-1 .html .htm .php
to .htaccess but no joy.