Get Rid of N for Characters and use all Unicode
Why do we need to add N when INSERT or even use NVARCHAR when you can use VARCHAR as unicode?
Hope this will be a feature request which will come soon
Solomon Rutzky commented
Hi Jassim. What exactly is the request here? Unicode isn't a singular thing. Yes, it is a single character set, but it has 3 different encodings: UTF-8, UTF-16, and UTF-32. The "N" prefixed strings as well as the NCHAR, NVARCHAR, and NTEXT (deprecated, don't use) datatypes are always UTF-16. SQL Server 2019 introduced the "_UTF8" collations, which are also Unicode, but only affect non-"N"-prefixed strings, as well as the VARCHAR and CHAR datatypes (but not the deprecated TEXT datatype).
So, if you are using SQL Server 2019 AND are using the "_UTF8" collations, then you can use Unicode without prefixing string literals with "N" or using NVARCHAR / NCHAR. Of course, UTF-8, while convenient in some cases, can be bad for other cases.
And since you can do Unicode in non-"N"-prefixed / VARCHAR now, why is there a request to remove the "N" prefix? You can simply use UTF-8 and not use "N"-prefixed strings or NVARCHAR / NCHAR.
Or, are you wanting to do UTF-16 in non-"N"-prefixed / VARCHAR? That would make SQL Server like several other RDBMSs, and that could be interesting, but currently that concept doesn't even make sense as there would be no way to indicate that non-"N"-prefixed / VARCHAR data should be UTF-16. Maybe they could add a new set of collations (not an exciting idea as there are already 5500 collations). Maybe a database-scoped configuration could be added to indicate that VARCHAR is actually UTF-16?
However, what exactly are you requesting? It isn't very clear.
If it helps, please see the following post of mine that explains how encodings work across the various string datatypes:
How Many Bytes Per Character in SQL Server: a Completely Complete Guide ( https://sqlquantumleap.com/2019/11/22/how-many-bytes-per-character-in-sql-server-a-completely-complete-guide/ )
P.S. I'm only voting for this suggestion to get notifications because it's the only mechanism that this horrible UserHasNoVoice platform provides.