I have a website where I\'ve used php to include sections rather than having code be duplicated for each page.
However, recently my webhost upgraded the PHP to 5.6, and
If you have multi host web server especially with older websites and multiple languages, for maximum compatibility with earlier PHP versions like 5.4 just force reset default_charset value in /etc/php.../php.ini:
In the global [PHP] section find this key and edit, or put like this:
default_charset = ""
This will not force PHP to set UTF-8 charset for all php files, especially older legacy or national encoding like windows-1251
, windows-1257
, iso-8859-1
, iso-8859-2
, ISO-8859-13
and similar.
Or if you are developer, sure use Rob's answer and add code directly to you php application ini_set("default_charset", "");