Skip to content Skip to sidebar Skip to footer

Html/php Encoding, Special Characters Work On One Server For Not Another

I'm having problems understanding why one server running PHP/Apache is formatting special characters properly and another one isn't. the meta tag i am using is;

Solution 1:

The HTML meta tag only has secondary significance for signalling the encoding; the HTTP Content-Type header takes precedence if present. One server is setting that header, the other isn't (or is setting the wrong one).

Either set your default charset appropriately in Apache, or explicitly output that header yourself in PHP:

header('Content-Type: text/html; charset=iso-8859-1');

Post a Comment for "Html/php Encoding, Special Characters Work On One Server For Not Another"