This is my word "नमस्कार". (It is Indian language (Marathi language) ) mysql is showing like something in image attached

How to store Unicode characters to Mysql to show properly?

Recommended Answers

All 4 Replies

try storing collation as utf8_general_ci for the varchar/text column, then normal update insert will save it in unicode

I am using utf8_general_ci but it is showing characters like in image attached

and also tried with utf8_unicode_ci,

it gives correct out put on php page but, when I go to database it shows "नमस्कार",

this value is for word "नमस्कार"

Database should display word("नमस्कार") as it is("नमस्कार") in database window(for me its phpmyadmin)

(I have big database of words)

I think its depend on how you use php or any other application to pass information to mysql server.
In phpmyadmin when i pasted नमस्कार, it is stored well in same way (i m using utf8* collation)

Also if you store codes in mysql, that also can be represented in language word on browser very well.

So just check your database updating pages, how they behaving.

if I insert नमस्कार using php, it inserts code for this word, I want to insert नमस्कार as it is using php into mysql database (phpmyadmin)

codes are working but I do not want any codes for words. I want to insert words as it is into mysql database

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.