UTF-8 support
Starting with SQL Server 2012, Unicode UTF-16 is supported with the nchar
, nvarchar
, and ntext
data types. Starting with SQL Server 2019, UTF-8 encoding is enabled, through the use of a collation using a _UTF8 suffix and the non-Unicode data types of char and varchar become Unicode-capable data types, encoded in UTF-8.
Collations that support supplementary characters, either through the use of the _SC flag or because they are version 140 collations, can be used with the new _UTF8 flag.
Why UTF-8?
UTF-8, UTF-16, and UTF-32 can all found on the web. In recent years, UTF-8 has become the standard. It can represent any character, and in some cases uses less storage (at least with western languages which mostly use of ASCII characters) than UTF-16 and the fixed format of UTF-32. UTF-8 is also backward-compatible with 7-bit ASCII, which may or may not be important to you.
If you have issues with endianness, the way the processor you are using determines which bit...