Changing session character set from ASCII to UTF8 causes trailing white spaces.
When I change the session character set from ASCII to UTF8 the published data has trailing white spaces.
I enabled tracing for Teradata driver(in ODBC data source administrator) and captured the traces for both cases and found that under the SQLDescribeCol for the data item, the SQLULEN is 109for ASCII) and 20 (for UTF8). Is this the cause for the trailing white spaces?
Re: Changing session character set from ASCII to UTF8 causes trailing white spaces.
UTF8 is a multi-byte character set. Teradata Database will calculate an Export Width based on column character set (Latin, Unicode, KanjiSJIS) and export width (see HELP SESSION) for the session. For example "Col1 Char(100) Lation Character set" will be exported as 100 bytes for ASCII session and 300 bytes in UTF8.
That said, there are two solutions: a) Turn on "Use Native Large Object Support" in ODBC Driver Setup for Teradata Database. b) Export the column as VarChar.