A number of our customers are experiencing this issue. The problem occurs because 000webhost's servers are already specifying the character set within the transfer protocol, that being UTF-8. This causes the browser to overwrite the chosen charset inside the document with that provided by the server.
UTF-8 however does not cover all characters with all accents, therefore we've created this tutorial which will help you overwrite server's configuration.
For plain HTML documents
- Go to 000webhost cPanel > File Manager
Double click on
.htaccess file (if you have no such file, go to the top right corner of the screen, and select "New File". Name it
Add this code to a new line:
Save the file.
Now you can specify the character set inside the document by appending
<meta charset="CHARACTER_SET"> tag within
<head> [...] </head> tags, and your website will display properly
For PHP scripts
Download a FTP client.
files.000webhost.com with your website's credentials (Set Security to: Plain FTP)
Open your PHP script
Add this at the beginning of your file:
<?php header("Content-Type: text/html; charset=%CharSet%", true); ?>
Replace %CharSet% with your desired character set
Save your file
- No, this form does not modify your original documents.
- No, this form does not convert characters from another area into UTF-8! This is simply a trick to force 000webhost's servers to specify the chosen charset to the browser.
To add either
<meta charset> tag to your HTML document, or
header() function to your PHP script, first download it using a FTP client, and then modify it manually using a text editor (preferable Notepad++). Then upload your document to your server again.
If you have any questions or any bugs to report, please do post them here.