Our servers announce UTF-8 by default, the current standard. You normally do not need to change anything, and if your accents display incorrectly, the cause is almost always elsewhere.
In short: the server announces UTF-8 by default: declare <meta charset="utf-8"> in your pages instead. The Default charset is changed in Apache configuration (Website card), only for an old site in ISO-8859-1.
Prerequisites
- Have access to your Apanel console.
What to know before you start
The Default charset setting determines the encoding that the server announces to the browser. Only modify it in one case: your site is old and its files are actually saved in ISO-8859-1 (Latin-1), and you cannot convert them.
Changing this value does not convert anything: it only changes the label. If your pages are in UTF-8 and you announce Latin-1, you turn a correct site into an unreadable one.
How do I declare the encoding in the page?
A page that declares its own encoding displays correctly regardless of the server setting. Place this line at the very beginning of the <head> section:
<meta charset="utf-8">
This is the most reliable method, and the one that follows your site if you ever move it elsewhere.
How do I change the character set announced by the server?
- Log in to your Apanel console.
- From the dashboard, click the name of your domain to open Hosting management.
- In the Website card, click Apache configuration.
- In the Default charset field, choose UTF-8 or ISO Latin1 (ISO-8859-1).
- Click Save.
Troubleshooting
If your accents display incorrectly, three links must agree. First, identify the symptom:
| What you see |
Link at fault |
What to do |
é instead of é |
The encoding declaration |
Add <meta charset="utf-8"> to your pages; check the character set in Apache configuration |
? or � |
The text was corrupted during saving |
The database connection is not in UTF-8: see Fix incorrectly displayed accents by switching PHP, MySQL and the browser to UTF-8 |
| Only certain files cause problems |
The source files themselves |
Re-save them in UTF-8 without BOM from your editor |
Going further