Total Pageviews

Friday, March 22, 2013

ASP.NET , Mysql and Unicode for Hindi

ASP.NET , Mysql and Unicode for Hindi

Step 1. In mysql table structure change latin1_swedish_ci  to utf8_unicode_ci  

subject text utf8_unicode_ci
sender text latin1_swedish_ci

Step2: Add Character Set=utf8; in your connection string

add name="vinConn" connectionString="server=;User Id=admin;password=**;database=entertrack;Persist Security Info=True;Character Set=utf8; " providerName="MySql.Data.MySqlClient"/>
Step3: Use N in insert statement
like insert into tesr (subject) values (N'महानदी ')

No comments: