2.5.293 XLUnicodeRichExtendedString

The XLUnicodeRichExtendedString structure specifies a Unicode string, which can contain formatting information and phonetic string data.

This structure’s non-variable fields MUST be specified in the same record.

This structure’s variable fields can be extended with Continue records. A value from the table for fHighByte MUST be specified in the first byte of the continue field of the Continue record followed by the remaining portions of this structure’s variable fields.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

cch

A

B

C

D

reserved2

cRun (optional)

...

cbExtRst (optional)

...

rgb (variable)

rgRun (variable, optional)

ExtRst (variable, optional)

cch (2 bytes): An unsigned integer that specifies the count of characters in the string.

A - fHighByte (1 bit): A bit that specifies whether the characters in rgb are double-byte characters. MUST be a value from the following table:

Value

Meaning

0x0

All the characters in the string have a high byte of 0x00 and only the low bytes are in rgb.

0x1

All the characters in the string are saved as double-byte characters in rgb.

B - reserved1 (1 bit): MUST be zero, and MUST be ignored.

C - fExtSt (1 bit): A bit that specifies whether the string contains phonetic string data.

D - fRichSt (1 bit): A bit that specifies whether the string is a rich string and the string has at least two character formats applied.

reserved2 (4 bits): MUST be zero, and MUST be ignored.

cRun (2 bytes): An optional unsigned integer that specifies the number of elements in rgRun. MUST exist if and only if fRichSt is 0x1.

cbExtRst (4 bytes): An optional signed integer that specifies the byte count of ExtRst. MUST exist if and only if fExtSt is 0x1. MUST be zero or greater.

rgb (variable): An array of bytes that specifies the characters in the string. If fHighByte is 0x0, the size of the array is cch. If fHighByte is 0x1, the size of the array is cch*2. If fHighByte is 0x1 and rgb is extended with a Continue record the break MUST occur at the double-byte character boundary.

rgRun (variable): An optional array of FormatRun structures that specifies the formatting for each text run. The number of elements in the array is cRun. MUST exist if and only if fRichSt is 0x1.

ExtRst (variable): An optional ExtRst that specifies the phonetic string data. The size of this field is cbExtRst. MUST exist if and only if fExtSt is 0x1.