Why are my accents breaking in SQL Server 2005?
When I update my database with this command:
UPDATE myTable SET Name = 'Hermann Dönnhoff' WHERE ID = 123;
SQL Server actually puts "Hermann Do ¨nnhoff" in the box instead. Instead of inserting o-umlaut (char (246)) correctly, I get two characters (char (111) + char (168)). This happens for all characters with accent marks, not just umlauts. Has anyone seen this?
Thank.
For Unicode data, you need to use the data types nchar
, nvarchar
or ntext
.
The problem is that your codepage doesn't support these characters directly.
For more information, read the help:
http://msdn.microsoft.com/en-us/library/aa214408%28SQL.80%29.aspx
http://msdn.microsoft.com/en-us/library/aa174903%28SQL.80%29.aspx
source to share