c# mysql AddWithValue unicode -


i'm working c# , mysql now. i've tried search around internet day find out why can't use addwithvalue method add unicode characters because when manually add in mysql, works! in c# code mysql connector .net doesn't work. other unicode characters fine.

cmd.commandtext = "insert tb_osm values (@id, @timestamp, @user)"; cmd.parameters.addwithvalue("@id", osmobj.id); cmd.parameters.addwithvalue("@timestamp", osmobj.timestamp); cmd.parameters.addwithvalue("@user", osmobj.user); cmd.executenonquery(); 

for example: osmbj.user = "ສະບາຍດີ", "???????" in database. please t^t

does link you?

read/write unicode data in mysql

basically says, should append connection string chatset=utf8;

like so: id=my_user;password=my_password;database=some_db123;charset=utf8;


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -