Before we start we need to make mySQL database capable of supporting unicode characters. For that we need to change the database collation or the table collation to utf8_unicode_ci. This can be done with phpmyadmin portal.
- Click the table you need to change.
- select Structure tab.
- Check the required column and click change or edit.
- From the collation drop down select utf8_unicode_ci.
- Press Go.
Now your mySQL database table column is unicode supported. You can insert some unicode values via phpmyadmin itself. Just copy and paste unicode text from some websites like http://www.manoramaonline.com and submit. Ok we got our unicode text inserted into our unicode field in a table.
Next we will see how to display that content on the webpage using php.
Below is the normal command to connect with our mySQL database.
After the above command insert below lines and our mission is accomplished.
Now the data retrieved and displayed with standard commands will display those unicode characters properly.