Asian rules for message text formatting

Some characters should not be placed at the beginning of a line, and some should not be placed at the end of a line. These beginning-inhibited and ending-inhibited characters are different among the languages, yet the required process is the same. Thus, ISPF uses the same text formatting process for the Asian languages, but it uses a different beginning-and-ending-inhibited character table for each language. The CCSID of the message is used to determine which tables to use. If no CCSID is specified, the session language ID and terminal type determine the tables used. See Extended code page support.

The message text is first split into words. An SBCS word is delimited by blanks, or SO/SI characters. Then any beginning inhibitors are stripped from the beginning of the word and treated as separate words, and any ending inhibitors are stripped from the end of the word and treated as separate words.

Adjoining DBCS alphanumeric characters (that is, Ward 42 characters) are treated as one DBCS word. Then any beginning inhibitors are stripped from the beginning of the word and treated as separate words, and any ending inhibitors are stripped from the end of the word and treated as separate words. All other non-Ward 42 double-byte characters are treated as separate DBCS words.

If a word is longer than the message window width, the window is expanded to the width of this word. However, if a word exceeds the maximum window size (screen width = 3), the word will be split and continued on the next line. If the text consists of mixed data and does not fit in one line within the specified width, the first position will always be reserved for an SO character (if first word is double-byte) or for a blank (if the first word is single byte). This will allow the text to be aligned properly.

Words that exceed the width of the message window are wrapped to the next line according to following rules:

where:

CE-1 and CE
Last two words that fit on line
CB and CB+1
First two words on next line
E
Ending inhibitor
B
Beginning inhibitor
X
Neither
Forward
Move CE to next line
Backward
Move CB to previous line
No process
Split as is.
Note: If words CE or CB are single-byte words and are more than one character, or if CE or CB are double-byte words and are more than one double-byte character, no special processing is used; the line is split as is.

SBCS and DBCS blanks that end or begin a line will be deleted.