title: Storing UTF-16/Unicode data in SQL Server
body: <p>According to <a href="http://msdn.microsoft.com/en-us/library/bb330962.aspx#intlftrql2005_topic4" rel="nofollow noreferrer">this</a>, SQL Server 2K5 uses UCS-2 internally. It can store UTF-16 data in  UCS-2 (with appropriate data types, nchar etc), however if there is a supplementary character this is stored as 2 UCS-2 characters.</p>
  
  <p>This brings the obvious issues with the string functions, namely that what is one character is treated as 2 by SQL Server.</p>
  
  <p>I am somewhat surprised that SQL Server is basically only able to handle UCS-2, and even more so that this is not fixed in SQL 2K8. I do appreciate that some of these characters may not be all that common.</p>
  
  <p>Aside from the functions suggested in the article, any suggestions on best approach for dealing with the (broken) string functions and UTF-16 data in SQL Server 2K5.</p>