I have a table on MS SQLServer with an nVarchar column. I am saving a UTF-8 character using an insert statement. It gets saved as ???. If I update the same column using the same value via an update statement, it gets saved correctly.
Any hint on what would be the issue here? The collation used is : SQL_Latin1_General_CP1_CI_AS
Show your insert statement. There is - quite probably - an
N
missing:Result:
Some Hindi from Wikipedia ???? ??????
Result:
Some Hindi from Wikipedia मानक हिन्दी
The
N
in front of the string literal tells SQL-Server to interpret the content asunicode
(to be exact: asucs-2
). Otherwise it will be treated as a 1-byte-encoded extended ASCII, which is not able to deal with all characters...