Locking-Shift Characters

A locking-shift character is a user-transparent character in an array or string, indicating that the remaining characters in the key or record are from a right graphic character set other than the default character set. A locking-shift introducer (LSI) is coded, followed by a locking-shift selector (LSS) that is unique for each of the supported character sets. For example, the sequence 90 A0 hex yields the locking-shift character (LS1) for Latin alphabet No. 1.

Using a locking-shift character in an NLS string is analogous to pressing the shift key on a typewriter to change all subsequent keystrokes until another locking-shift character or the end of a record is reached.

As with single shifts, the VOS compilers provide built-in functions that encode and decode locking-shift characters.

For examples of single- and locking-shift characters, see "NLS Strings" in Chapter 4.

For information about built-in functions, see "Manipulating Programming Strings" in Chapter 4.

Table 2-1 shows the supplementary graphic character sets in the VOS internal character coding system.

Table 2-1. The Supplementary Graphic Character Sets
Character Set
String
Languages Represented
Bytes per Char.
Single Shift Code
Single Shift Name
Locking Shift Code
Locking Shift Name
Latin alphabet No. 1
latin_1
European
1
80
SS1
90 A0
LS1
Kanji
kanji
Japanese
2
8E
SS2
90 AE
LS2
Katakana
katakana
Japanese
1
8F
SS3
90 AF
LS3
Hangul
hangul
Korean
2
81
SS4
90 A1
LS4
Simplified Chinese
simplified_chinese
Simplified Chinese
2
82
SS5
90 A2
LS5
Chinese
chinese1 and chinese2
Chinese
2

2
83

84
SS6

SS7
90 A3

90 A4
LS6

LS7
User-defined double-byte
user_dbcs
---
2
85
SS8
90 A5
LS8

The standards that define the character sets appear earlier in this chapter.

Note that Chinese is defined as one standard but occupies two character sets. The structure of the Chinese character set consists of two double-byte character sets.