Consultor Eletrônico



Kbase 15389: Fields not aligned when mixing single byte and DBE chars
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Fields not aligned when mixing single byte and DBE chars

If using Double-byte Enabled Progress and fields that contain both
single byte and double byte characters (ie English and Chinese)
are not aligned properly, it is because the starting column for the
field was calculated using the character unit of measurement.

The starting column needs to be calculated using raw bytes.

One double-byte character will occupy the space for two characters
on the screen or a printed report.

To fix this situation, use the double-byte enabled version of the
following functions: OVERLAY(), SUBSTRING() and LENGTH().

These functions have an added parameter which denotes whether the
string will be handled as characters or as raw bytes. There are three
types; RAW, FIXED and CHARACTER. If the parameter is not specified,
it defaults to CHARACTER.

For example,
OVERLAY(stringname, position, length, unit of measure) =

OVERLAY(customer.cust-num, 5, -1, "RAW") =

Note: The -1 in the length parameter means "until the end of the
string". This is available only for double-byte enabled.

Progress Software Technical Support Note # 15389