Unicode in PHP and MySql
While I was working with Nepali Unicode in PHP and MySql, I found difficulty in inserting Nepali into database. I made some explorations and found a way to deal with this.
There are some basic things you need to be careful when working with Unicode, especially with database.
The database itself should be encoded in UTF-8 format and whatever is the method to access that particular database, The programming language should be aware that the database is UTF-8 enocded.
The field to store Unicode text should also be changed to<Strong>utf8_general_ci</strong> under collations.
1. How to create database UTF-8 encoded.
a. Start Phpmyadmin, Then enter the database name
Under MySql Connection Collation select utf8_general_ci then hit create.
See the figure below <figcaption class="wp-caption-text">Database Encode</figcaption>
That