utf-8 or utf-16?

  • How can we find out what format unicode data is used in a table,utf-8 or utf-16 format?

  • I think that utf-8 is used in SQL SERVER 2008 r2 and before. The new SC (supplementary character) sets are available in SQL SERVER 2012.

    http://msdn.microsoft.com/en-us/library/ms143503.aspx

    Fitz

  • SQL Server 2008 does not use UTF-8 anywhere in terms of storing data internally, and neither does SQL 2012.

    SQL 2008 stores unicode data using UCS-2, a subset of UTF-16LE (the LE is implied in their documentation) for National types like NVARCHAR and NCHAR. It stores XML data as UTF-16 internally.

    Things have improved slightly in SQL 2012 with respect to the National types as UTF-16 is now supported (i.e. multi-bytes characters are interpeted properly), however only when using a Supplementary Character collation.

    Collation and Unicode Support (2012)

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply