By ronen ariely on
22/10/2019 14:29
Azure SQL Database and SQL Server 2019 introduce full support for UTF-8. This is a game changer for developers, but it came with a price! Old functions like CHAR() and ASCII() which were designed to be used on Extended ASCII, return strange result and might lead to unexpected result when we are using UTF-8 COLLATE. Moreover! the documentation at this time is wrong and was not updated to cases that the user use UTF-8 COLLATE.
In this post I will go over the function ASCII, explain how it was designed to work (according to my understanding), show the problematic in SQL Server 2019, and I present full explanation including some internals information which will help us better understand the topic.