17.20 - KanjiEUC Example - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine International Character Set Support

Advanced SQL Engine
Teradata Database
Release Number
June 2022
Last Update
Content Type
User Guide
Publication ID
English (United States)

For example, consider the following SELECT statement from a KanjiEUC session.


The string Âgé is translated internally to UCS2.

00 C2 00 67 00 E9
 g é

Because this is three characters, the expected-defaults exports at most six bytes, but the representation of Âgé in KanjiEUC requires seven bytes.

8F AA A4 67 8F AB B1
 g é

Therefore, the output must be truncated to six bytes.

Truncation occurs at a character boundary, so the output is truncated to Âg, which requires four bytes.

If this were a fixed width field, these four bytes would be padded with SPACE characters to produce six bytes. Because the field is not fixed width, only four bytes are output (excluding the length information which is always included in variable width data).

8F AA A4 67