[freetds] nchar, nvarchar, unichar, univarchar
DCorbit at connx.com
Mon Sep 17 18:25:25 EDT 2007
For Sybase (not SQL*Server, which has self-identifying levels for the
Tabular Data Stream) how do we recognize and utilize the data types
nchar, nvarchar, unichar and univarchar?
What is the internal format difference between nchar and unichar and
between nvarchar and univarchar? (IOW, what is the reason for the
separate data types?)
select c.name, c.type from dbo.sysobjects o, dbo.syscolumns c
where o.name = '<talbe_name_goes_here>' and c.id = o.id
Does not seem to differentiate between char and nchar columns (both type
47) nor varchar and nvarchar columns (both type 39), though I can see
that unichar and univarchar columns have types of 135 and 155.
How can I collect the Unicode encoding of a column (querying master
tables is fine) and especially I want to know if it is UTF-8 or UTF-16
or something else and what the codepage is.
More information about the FreeTDS