How many bytes a unicode character set takes?

Database
Teradata Employee

How many bytes a unicode character set takes?

If I declare a column as Unicode character set, and using UTF-8, how many bytes each characters required.

For example if I decalre following table

CREATE TABLE TEST (
NAME VARCHAR(100) CHARACTER SET UNICODE
)

"NAME" column will consume how many bytes?

Thanks & Regards
Mohsin Ali
3 REPLIES
N/A

Re: How many bytes a unicode character set takes?

On the Teradata server, Unicode characters are held as UTF-16 - each character occupies 2 bytes. So in your case, NAME will occupy two bytes for the length and two bytes for each character. The field will be two bytes for a zero length string to 202 bytes for a 100 byte string.

Re: How many bytes a unicode character set takes?

In Teradata 13.10, there is a new algorithmic compression feature that is particularly useful for reducing the space utilization requirement for Unicode data. The actual space savings will vary depending on the specific algorithm used and on the data characteristics.

Re: How many bytes a unicode character set takes?

How do you set the Teradata Server for Unicode, specifically UTF-8 ? I do a query:
select * from dbc.chartranslations;
But I do not see any Unicode sets listed, only the standard ASCII code sets.
I'm getting an error loading UTF8 data from Oracle to Teradata using DataStage ETL tool, and the Teradata TPT connector. Any ideas?