I have a web application using entity framework to read and update a database. The data being entered into the database can contain a range of different characters such as superscript and characters like this: β.
They are not saving into the database correctly - they are displaying like as follows: cm3.
The column is already a NVarChar and the database collation is Latin1_General_CI_AS.
I expect the text to be exactly the same as what was entered.
1条答案
按热度按时间yqlxgs2m1#
You can simple use the Unicode method Example:= SELECT cast(N'Abhinandᵀᴹ' as nvarchar) AS Sample
nvarchar converts string into Unicode so a way to use a superscript is to putting it into a Unicode
note use the capital N before your string or text, otherwise it won't show