Search code examples
phphtmlutf-8character-encodingmeta

html php meta charset UTF-8 not working?


Possible Duplicate:
Browser displays � instead of ´

i'm kind of stuck on a php file with almost only html in it. I use PHP only to send information from a contact form to my mail adres.

When developing the website on localhost everything was all fine. After uploading to my server it messes up the special characters.

My meta tag looks like this:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

If someone could please help me it would be highly appreciated.


Solution

  • Add this to the header in your php file and let me know if it solves or not -

    header('Content-Type: text/html; charset=UTF-8');