Try OpenEdge Now
skip to main content
Internationalizing Applications
Using Multi-byte Code Pages : Output : FORMAT phrase : Fitting multi-byte characters into the available columns
 
Fitting multi-byte characters into the available columns
Before displaying or printing a multi-byte character, OpenEdge ensures that the display or print field contains enough columns to accommodate the entire multi-byte character. If there are not enough columns, OpenEdge does not display any of the multi-byte character and pads the columns of the display field or print field with spaces.
Note: OpenEdge neither splits nor truncates multi-byte characters to make them fit a display field.
For example, suppose you use the following format string, which specifies a seven-byte character field:
FORMAT "x(7)".
You want to display the following character string, which consists of four double-byte characters:
OpenEdge displays the first three double-byte characters in columns 1 through 6 of the field and a space in column 7:
OpenEdge does not display any of the fourth double-byte character, not even its lead byte, because doing so would split its lead byte from its trail byte, and the character would not appear properly.