When a shift character is in the data stream

In this example, the conversion service switches between the SBCS table and the DBCS table when a shift character is in the data stream.

Figure 1 illustrates this method.

Figure 1. Conversion of MBCS data to Unicode characters
Conversion of MBCS data to Unicode characters.

Shift characters in the input character stream specify if the subsequent data represents SBCS or DBCS characters. 'Shift out' character means that DBCS data will follow. 'Shift in' character means that SBCS data will follow. Thus, the conversion service switches between the SBCS table and the DBCS table. (In Figure 1 the 'shift out' character is indicated by SO and the 'shift in' character by SI).

The converter selects one table that handles the SBCS part (CCSID 1027 to CCSID 13488) and another table which handles the DBCS part (CCSID 300 to CCSID 13488). The selection depends on the specified technique-search-order characters and the availability of the appropriate conversion tables.