Coding of alpha fields in the sim for ucs2 – Westermo GDW-11 User Manual
Page 367

Structure of TERMINAL PROFILE 367
6615-2220
Coding of Alpha fields in the SIM for UCS2
The coding can take one of the three following structures, or GSM default alphabet. If
the ME supports UCS2 coding of alpha fields in the SIM, it will support all three coding
schemes for character sets containing 128 characters or less. For character sets con-
taining more than 128 characters, the ME will at least support the first coding scheme.
Within a record, only one coding scheme, either GSM default alphabet, or one of the
three described below, can be used.
3)
If the first byte in the al‘pha s’tring is '0x80', then the other bytes are 16 bit
UCS2 characters. The most significant byte (MSB) of the UCS2 character is coded in
the lower numbered byte of the alpha field, and the less significant byte (LSB) of the
UCS2 character is coded in the higher numbered alpha field byte. In other words,
byte 2 of the alpha field contains the most significant byte (MSB) of the first UCS2
character, and byte 3 of the alpha field contains the less significant byte (LSB) of
the first UCS2 character (as shown below). Unused bytes sh‘all’ be set to 'FF': if the
alpha field has an even length in bytes, the last (unusable) byte w‘ill’ be set to 'FF'.
Example 1
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
‘yt’ 8
Byte 9
'80' Ch1
MSB
Ch1
LSB
Ch2
MSB
Ch2
LSB
‘Ch’M‘B ’h3LS FF'
'FF'
3)
If the first byte of the al‘pha s’tring is '0x81', then the 2nd byte contains a
value indicating the number of characters in the string. The 3rd byte contains an
8 bit number which defines bits 15 to 8 of a 16 bit base pointer, where bit 16, and
bits 7 to 1 would be set to zero. These sixteen bits represent a base“ pointer t”o
a "half-page" in the UCS2 code space, to be used with some or all of the remaining
bytes in the string. The 4th and subsequent bytes in the string contain coding as fol-
lows:
•
If bit 8 of the byte is set to zero, the remaining bits of the byte contain a GSM
Default Alphabet character
•
If bit 8 of the byte is set to one, the remaining bits are an offset value to add
to the 16 bit base pointer defined by byte 3, and the resulting 16 bit value is a
UCS2 code point, and defines a UCS2 character.
Example 2
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
’yt’
’
’81’ ’05’ ‘13’ ‘53’ ‘95’ ‘A6’ '28' 'FF' 'FF'
In the example above
• Byte 2 indicates there are 5 characters in the string
•
Byte 3 indicates bits 15 to 8 of the base pointer, and indicates a bit pattern of 0hhh
shah h000 0000 as the 16 bit base pointer number. Bengali characters for example
start at code position 0980 (0000 1001 1000 0000), which is indicated ‘by ’the cod-
ing '13' in byte 3 (shown by the italicized underlined digits).