Website URL
Error Message
Accents and special characters don’t appear
Other Information
How can I prevent the server from changing charset=iso-8859-1 to charset=utf8 in all my HTML files? Thank you.
You may be surprised to hear that the only valid input to the charset field these days is utf-8. Browsers, servers, all assume that the file is encoded with UTF-8 and doesn’t like other type of charsets.
Instead of trying to make a different charset work why not consider change your HTML file into UTF-8? In this way you’ll experience little to none problems with encoding.
Thank you
on the previous server, the problem was solved by uploading a form.php file instead of changing the charset on each html file but it does not fonctionate here.
I don’t know what “form.php” file you are talking about given that you didn’t shared its content but it doesn’t matter.
The best way is still just use UTF-8 by yourself instead of trying to make other encodings work.
The server isn’t changing anything. And that’s precisely why you are having this issue.
Modern browsers basically assume that everything is UTF-8. HTML5 only supports UTF-8 and nothing else. Your page uses a HTML 4 doctype, so it should still support other encodings. But then you will still need to tell browsers what the right encoding is with a charset meta tag.
Right now, you have a page that’s not UTF-8, but do not include any information that tells a browser what encoding it should use.
But I strongly recommend to just switch to UTF-8 instead. UTF-8 works everywhere, on all devices, for basically all languages, 100% future proof, with no other configuration needed.
Thank you, I’ve switched to utf8 and it works now, problem solved.