简体   繁体   中英

how to store Indian language like Telugu,Hindi in mysql database

can anyone tell the procedure for storing Telugu,Hindi languages text in Mysql database.I have tried some procedure like

set names 'utf8'; and after that i have setted character set='utf8' and collate is utf8_general_ci at database level,table level and also column level.But while inserting data into database it displaying ????.

please give some solution for that.

For Collation of that column of the table use utf8_czech_ci . And use this below code at the end of your database connection. If there have similar like this portion of code then replace that portion with below code.

mysql_query('SET CHARACTER SET utf8')or die('charset problem:'.mysql_error());
mysql_query("SET SESSION collation_connection ='utf8_general_ci'") or die('collation   problem:'.mysql_error());

Because you need to set the Unicode format by Collation in column and again when you have to fetch that data in Unicode format you need to use the given query.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM