Coding of alpha fields in the sim for ucs2, Appendixes, 6 coding of alpha fields in the sim for ucs2 – Rainbow Electronics FARGO MAESTRO 100 (with TCP_IP) User Manual

Page 772

Advertising
background image

APPENDIXES

Technical

Appendixes

© Restricted

Page:

66 / 80

This document is the sole and exclusive property of Wavecom. Not to be distributed or divulged without
prior written agreement.

WM_DEV_OAT_UGD_049 - 001

APPENDIXES

August 23,

2007

3.6 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 containing 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.

1. If the first byte in the alpha string 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 shall be set to ‘FF’: if the

alpha field has an even length in bytes, the last (unusable) byte will be set to ‘FF’.

Example 1

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

Byte 8

Byte 9

‘80’ Ch1

MSB

Ch1

LSB

Ch2

MSB

Ch2

LSB

Ch3

MSB

Ch3

LSB

‘FF’

‘FF’

2. If the first byte of the alpha string is ‘0x81’, then the 2

nd

byte contains a value

indicating the number of characters in the string. The 3

rd

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 to a "half-

page" in the UCS2 code space, to be used with some or all of the remaining bytes

in the string. The 4

th

and subsequent bytes in the string contain coding as follows:

• 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

Byte 8

Byte 9

‘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

Advertising