Today i noticed that html symbols such as: ★ are being displayed in my database as a question mark.
I'm using varchar as type and the database i am using is microsoft sql 2008.
Does anyone know a fix for this?
Today i noticed that html symbols such as: ★ are being displayed in my database as a question mark.
I'm using varchar as type and the database i am using is microsoft sql 2008.
Does anyone know a fix for this?
Define the symbol as an NVARCHAR instead of a VARCHAR
above is the syntax for inserting and make sure your field data type is
nvarchar
or try this test exampleYou need to use
NVARCHAR
datatype for your column, VARCHAR datatype can only be use for non-unicode character.if you are storing unicode characters in your datatype you should use NVARCHAR datatypes and when inserting Data into your Column use the
N
prefix telling sql server there will be some unicode characters in the passed string.With VARCHAR DataType
Result
With NVARCHAR DataType
Result