c# - My website could possibly receive both Unicode and Non-Unicode characters -


a user on website possibly add comment on item contains both arabic , english characters. maybe arabic, others english, , others french!

it's international website can't expect characters being stored in application. website has nothing facebook need comments' textboxes able accept , show characters language!

...so how think achieve ?

all strings in .net unicode strings (see documentation of string class more information). taking input user in mix of languages shouldn't problem.

if plan store information in database need make sure database columns of type nchar or nvarchar. others pointed out, when run queries against these columns out of ssms need prefix unicode strings n make sure handled properly. when executing queries code should use parameterized queries (or orm, better) , ado.net take care of constructing queries you.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -