In a mixed string field, all strings are assumed to begin in single byte mode. The display system must distinguish where the mode changes from single byte to multiple byte.
When a mixed string is output, each character is transmitted to the device without alteration until an SO or SI control code is encountered. When an SO code is encountered, then an SA order specifying the appropriate character set (x'F8' for DBCS) is inserted into the data stream and the SO code is discarded (it is not removed from the variable however). Then, double byte characters are transferred to the data stream until an SI is encountered. When an SI is found, the SI is discarded and an SA order specifying the default character set for the field is inserted. The single byte characters are then copied into the data stream as before. This process can be continued for as long as possible, with any number of SO/SI pairs in the same string.
The controller synthesizes SO/SI control codes and places them in the data for the field returned in the inbound data stream. The control codes exist only in the data stream that the controller returns to the host program. The codes are synthesized from the character set selections made by the SA orders when the fields were written. Also, if the user is allowed to enter SO/SI codes, these are returned to the host program.
|
Copyright © 2013 CA.
All rights reserved.
|
|