Sometimes the text in our website has been placed on pages using different charsets than the standart one (UTF-8, generally), this can lead into issues while loading special characters for Spanish, Portuguese and other languages different than english. For those times you may need to tweak out the Apache default charset.
The default charset for Apache can be configured from two places:
- Default httpd.conf file
Look for the AddDefaultCharset variable and set it to match your needs, example:
Restart Apache to apply the changes:
service httpd restart
- .htaccess for one cPanel account in particular: just place this inside your .htaccess file in your public_html directory:
Reload your webpage and it should be ready. Now all your files inside public_html and the subfolders will use the new configured charset.
If you are still facing issues with your characters then it may not be an issue with Apache, but with your MySQL charset, that can be tweaked using phpmyadmin, we will cover that in another tutorial.