ifx_int8toasc() writes the digits left justified and blank pads out to
the length it is given, without terminating. The unload path passed the
full buffer and then only skipped blanks on the *left*, which there
never are, so every INT8 and SERIAL8 value was written to the file
padded to the width of the buffer:
0 |
9223372036854775807 |
rather than
0|
9223372036854775807|
The values themselves were right, but the files do not match what
Informix produces, and the padding is carried into anything that reads
them by column position.
Now calls strip() on the buffer first, which is exactly what the
DECIMAL case already does with dectoasc() output for the same reason.
The left hand skip is kept as a guard in case a future version right
justifies, with a comment saying so rather than asserting the padding
is on that side.
Verified by unloading INT8 and SERIAL8 columns and loading the file
back: all columns compare equal after the round trip, and DECIMAL and
CHAR fields in the same file are unaffected.