Reputation: 60
I am having textbox in a form. Users filling the form along with mathematical symbols but it is converting to some other character while storing to database(SQL). It should store the symbols, Can you tell me how do fix this issue?
Upvotes: 0
Views: 1148
Reputation: 11
Question column in your table should be able to store unicode characters, try change the type to nvarchar
create table test (
question nvarchar(10)
)
insert into test(question) values(N'√25 = 5')
Upvotes: 1
Reputation: 121
The way your symbols are stored depend on the encoding of the SQL database. You need to select an encoding which can handle math symbols like Unicode (https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode)
Upvotes: 0