Try OpenEdge Now
skip to main content
Internationalizing Applications
Using Multi-byte Code Pages : Output : FORMAT phrase : Fitting multi-byte characters around formatting characters
 
Fitting multi-byte characters around formatting characters
Before OpenEdge displays a multi-byte character, if the next byte in the format specification is a formatting character, such as a dash, OpenEdge inserts a space, then the dash, then searches the format specification for the next two available contiguous columns.
For example, consider the following format, which consists of three bytes, a hyphen formatting character, and four bytes:
FORMAT "xxx-xxxx"
You want to display the following string, which consists of four double-byte characters:
The result is the following string, which consists of the first double-byte character, a blank, the hyphen formatting symbol, the second double-byte character, and third double-byte character:
To build the resulting string, the AVM:
1. Displays the first double-byte character
2. Notices that only one column remains before the hyphen formatting character
3. Inserts a blank in that column
4. Displays the hyphen formatting character
5. Displays the second double-byte character
6. Displays the third double-byte character
7. Notices that no more space remains
8. Decides not to display the fourth double-byte character