If you have switched web host, or changed the database for your WordPress blog, you might encounter an issue where foreign characters are not showing up properly in your site. Instead of the foreign characters, you will see plenty of question marks (???) in its place. In this article, we will show you how to fix this problem and show proper language without losing any data.

What is character encoding?

Before going to the causes and solutions to this problem, we need to be clear about character encoding. Words and sentences in any language are made up of characters. These characters are grouped into character sets. Each character is stored in computer memory using a binary code. Using this code, computer can decode the actual character. This binary code is called character encoding.

Different languages use different codes to refer to different characters. The same code in two langauges can mean completely different characters. This is decided by which character encoding is used by the computer.

You may see some of the character sets on W3Schools that are used on the Internet. Head to Wikipedia for the complete set of characte sets.

Did you see ??? in your WordPress blog?

There can be a few causes that lead to displaying the wrong characters. First of all, you need to make sure that you are using the same character set in your wp-config.php file. Look for the following line and make sure it is not commented out:

define('DB_CHARSET', 'utf8');

encoding-config

Second, you need to check if your theme is using the character set that is set in wp-config.php file. Look for the following line in your HTML:

<meta charset="UTF-8">

And lastly, you need to check that your database content is stored with the same character set encoding that you are using in your wp-config.php file and HTML. If you are using phpMyAdmin to manage your database, you will be able to see the current server collation in General Settings.

encoding-phpmysql

Changing the character set of complete WordPress database is not an easy task and should be done with a lot of care. Here are the steps to convert a database to your character set of choice.

1. First of all, we need to check the current character set of the database. Here’s the SQL query for checking:

SHOW VARIABLES LIKE "character_set_database";

2. If the character set is not what you want, you should take a backup of your database before you proceed further.

3. Run the following SQL query to change the characater set of complete database:

ALTER DATABASE MyDb CHARACTER SET utf8;

Change “MyDB” to the name of your database.

4. Now convert the “wp-posts” table to the character encoding you want:

ALTER TABLE wp_posts CHARACTER SET utf8;

Change the “wp_” if you are using a different prefix.

These steps will remove the question marks or other weird characters and will show proper foreign characters instead. If you have many columns in the WordPress database that are set to custom character set, you will need to change the character set of each column one by one.

Since UTF-8 is the most commonly used character encoding, if your blog uses some other character encoding and you want to change it to UTF-8, you can use the plugin called UTF-8 DB Converter. Although it has not been updated for quite a long time, it will be able to do its task efficiently. Please note that if you have a large database, converting the character set will take a long time.

Tell us about your experience if you are having the same problem.

How Is Simple Different From Traditional Banking?

Simple is an online service that seeks to change the way people manage their money, but just how is it different from traditional banking?

How to Configure The Tabbed Inbox In Gmail

Google has recently introduced the new tabbed inbox in Gmail which will auto-sort your emails into various tabs and help you to be more productive. This new tabbed inbox interface is not activated by default. This article will show you how you can activate and configure the tabbed inbox in Gmail.

Why You Should Have Local Backups Of Your Cloud Backup

When it comes to cloud storage, one of the things you shouldn’t do is to place all your eggs in one basket. You should also take the precaution to backup the data to somewhere you can physically access. Allow me to explain why.

How to Easily Enable Real-time Collaboration on Your Site

If you are a webmaster, you might be thinking of how you can make your website more interactive, or even allowing your visitors to collaborate with one another. TogetherJS allows you to easily add a real-time collaboration feature to your site with minimal technical/coding skill.

How to Fix Foreign Characters Not Showing Up issue In WordPress

If you enter foreign character in WordPress, but only see question marks (???) showing up, here is the fix for this issue without losing any data.

8 Things You Should Do When Seeking Technical Support

Getting technical support is supposed to be easy, but sometimes we just make it more complicated. Here are things you should do to avoid getting stuck in support limbo.

How to Set Up and Use Mozilla’s Firefox Accounts

Firefox Sync is getting better in the new nightly version of Firefox. If you have not setup your Firefox account, here is how you can do so.

What Is the OpenSSL Heartbleed Bug and Why Should You Care?

Things just don’t work the way they should in the Internet. Here are some things you should know about the OpenSSL “Heartbleed” bug and how it affects you.

How to Change WordPress Permalink Structure

Do you want to change your website URL structure? Here is how to properly change your WordPress permalink structure and URL redirect.

K-Meleon – A Super Advanced Firefox Variant for Windows

K-Meleon is an advanced Firefox variant that wants to do everything by default. Is it suitable for you? Let check it out.

How to Run Android Apps in the Google Chrome Browser

Have you ever used an Android app and find that it could be useful for your desktop as well? Here’s how you can run Android apps in Chrome browser.

Protect Your Privacy and Browse Securely with HideMyAss VPN

HideMyAss VPN lets you access videos from any country, evade hackers and surf privately. Come read about all its features and enter to win 6 months free!