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.

Track Time and Goals Using Progress Bar Timer [Google Chrome]

Tracking your time and task can be a difficult job. While some may have no trouble keeping track of time in their heads, others may benefit from a more visual means of measuring progress. Progress Bar Timer is a Google Chrome extension that turns deadlines and quotas into convenient progress bars to help track time and goals.

How BitTorrent DHT Peer Discovery Works

Peer discovery is an essential part of the BitTorrent protocol. It’s how its downloads happen so quickly: You connect to multiple people, and each of them upload a little piece of the file to you. This article explains how the whole BitTorrent DHT peer discovery process works.

Add Events to Google Calendar From Anywhere in the Web

One of the biggest complaints about Google Calendar is that you can’t add events to Google Calendar without visiting the site. With Spot – Calendar’s Best Friend, you will be able to add events to Google Calendar, whenever you come across one anywhere in the Web.

How to Import your Instapaper Articles into Pocket

If you are planning to import Instapaper articles to Pocket, the procedure to is extremely easy and shouldn’t take more than a few minutes. Here’s how.

What You Need to Know About Future Web Standards (That are Making the Internet Better)

The Internet started 40 years ago and many things have changed since then. Let’s take a look at the future web standards and how they improve the Internet.

Pushbullet: Push Links and Files From Chrome or Firefox to Your Android Device

Sending content from desktop to Android is not as easy as it seems. An extension called Pushbullet for Google Chrome and Firefox makes this task easier.

How Image Compression Works: The Basics

Do you know that you can easily compress your high-res images to smaller size without affecting its image quality? Here’s how image compression works.

Restore Firefox’s Older “Strata” Theme with Greater Efficiency Than Before

For those who dislike the new Firefox “Australis” theme, you can install the “Classic Theme Restorer” addon to restore the popular Strata theme. Here is how it works.

How to Transfer the Contents of User Profiles in Firefox

If you are trying out a new Firefox-based browser, you can transfer the content of your old user profiles so all your items are intact. Here’s how to do it.

Enable HTML5 Playback in Google Play Music

The default settings of Google Play Music in a web browser make uses of Adobe Flash. Alternatively, you can switch it over to run on HTML5. Here’s how you can enable HTML5 playback in Google Play Music.

How to Copy Links as Plain Text in Firefox

Do you just want to copy the text of a link, and not the link? Link Stun can disable links in highlighted text so you can copy them as plain text.

How to Convert Images to Text (OCR) With Google Drive

Rather than using an expensive OCR software, you can now use Google Drive to convert image to text. Here’s how you can do so.