CHARACTER_SET_NAME of INFORMATION_SCHEMA.COLUMNS is NULL when UTF-8 is used
I am checking with SQL Server 2019 CTP 2.2.
Create a table with the following query:
DROP TABLE IF EXISTS T1
DROP TABLE IF EXISTS T2
CREATE TABLE T1 (
C1 int,
C2 varchar (20),
C3 nvarchar (20),
C4 varchar (20) COLLATE JapaneseXJIS140CIASUTF 8
INDEX CIXT1 CLUSTERED (C1)
)
After creating the table, check the information with the following query.
====
select TABLECATALOG, TABLESCHEMA, TABLENAME, COLUMNNAME, DATATYPE, CHARACTERSETNAME,COLLATIONNAME
from INFORMATION_SCHEMA.COLUMNS
The following information is output.
DATATYPE CHARACTERSETNAME COLLATIONNAME
varchar cp932 JapaneseCIAS
nvarchar UNICODE JapaneseCIAS
varchar NULL JapaneseXJIS140CIAS_UTF8
When UTF-8 is used, CHARACTER is NULL, but is not it better to display like UTF-8?

1 comment
-
Solomon Rutzky commented
This appears to be fixed in CTP 2.3.
P.S. Please see "Native UTF-8 Support in SQL Server 2019: Savior or False Prophet?" ( https://sqlquantumleap.com/2018/09/28/native-utf-8-support-in-sql-server-2019-savior-false-prophet-or-both/ ) for a detailed analysis of the new UTF-8 feature.