Save Persian Text With Emoji in MySQL Database

I am new to SQL and I don’t to know how to save Farsi text (string) with emojis in database.

Do I have to change the collation of database? Right now, its utf8_persian_ci.

Answer

درود they way we do that is by using a utf8mb4_persian_ci

CREATE TABLE `users` (

) DEFAULT CHARSET = utf8mb4_persian_ci 

This is how we would go about doing that. Persian Text will be saved using utf8mb4 it also Supports Emoji’s and Much Much more !

Leave a Reply

Your email address will not be published. Required fields are marked *