How to change website encoding?

To specify your website encoding for its representation in browser, you need:

  1. open the hosting control panel and proceed to the website root directory: /public_html/your-site.com How to open hosting control panel
  2. edit .htaccess by placing the following code to its very beginning: to set UTF-8 encoding AddDefaultCharset UTF-8
  3. now you can go to your website and clear browser cache by pressing ‘Ctrl’ + ‘F5’ or ‘Ctrl’ + ‘R’ on your keyboard. The encoding shall switch accordingly.

Changing the database encoding

  1. open the database management utility named ‘phpMyAdmin’: How to open phpMyAdmin
  2. open the necessary database by pressing on its name on your left and proceed to the Operations section. Select the required encoding for the MySQL database itself and press Change.
  3. now you can go to your website and clear browser cache by pressing ‘Ctrl’ + ‘F5’ or ‘Ctrl’ + ‘R’ on your keyboard. The encoding shall switch accordingly.