How to save other languages in mysql table?
Asked Answered
T

1

7

Hi I have to save hindi languages in mysql. how can I do that. any one knows the solution please help me.

Trenttrento answered 29/12, 2010 at 20:26 Comment(0)
F
13

You need to store all text as UTF8, then you'll be able to see Hindi characters. You can update a column to use UTF8 with a query like the following:

ALTER TABLE posts MODIFY title VARCHAR(255) CHARACTER SET UTF8;

Since you use PHP, make sure that all your PHP scripts are saved as UTF8. You can also set the connection charset with the following query:

SET NAMES 'utf8'

This will ensure that your web server and database servers communicate using UTF8.

Froude answered 29/12, 2010 at 20:28 Comment(1)
If the data is already stored in a non-utf8 column, you need to insert new data.Froude

© 2022 - 2024 — McMap. All rights reserved.