Montag, 23. Mai 2016

Chopped off characters

Setup

There is this Oracle table we read from, let's say:

create table TAB (TEXT varchar2(20 char));

It contains the text in the next line.
Der Text enthält äs.
If you count you will see its length is equal to precisely 20 characters. Our PowerCenter server runs Unicode UTF8. This also is the code page of the DB connection that is used by the source defined as varchar2 with length 20.

Problem

The end of the text gets chopped off.

Answer

Apparently, the source qualifier interprets the length as bytes such that the original text, containing multi-byte characters (ä) does not fit into the definition. If you increase the port length of the source qualifier, the text does not get chopped - even if the length of the port of the source definition is kept at 20!

Keine Kommentare:

Kommentar veröffentlichen