SQL Server ignores gel symbol

Viewed 79

Why does Server ignore the ₾ symbol ?

Why this:

print iif(N'₾' = N'', 'true', 'false')

is the same as:

print iif(N'₾2' = N'2', 'true', 'false')

What role does collation play in this situation and what is happening under the hood?

1 Answers

It looks to me that this is an issue related to the Unicode version when the character was introduced and the type of SQL Server collation that is used:

  • The € character was introduced in Unicode 2.1 and it returns false in all collations
  • The ₭ character was introduced in Unicode 3.0 and it returns false in the old collations (for example Latin1_General_CI_AS), but it returns true in the collations introduced in SQL Server 2008 (for example Latin1_General_100_CI_AS)
  • The ẞ character was introduced in Unicode 5.1 and it returns true in most collations, but it returns false in the collations introduced in SQL Server 2017 (for example Japanese_Bushu_Kakusu_140_CI_AS_VSS)
  • The ₸ character was introduced in Unicode 5.2 and it returns true in all collations (except BIN collations)
  • The ₾ character was introduced in Unicode 8.0 and it returns true in all collations (except BIN collations)
Related