2.7 UnicodeString

The UnicodeString packet represents a Unicode string.


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

Length

Characters (variable)

...

Length (4 bytes): The length in 16-bit Unicode characters of the Characters field, including the null terminator, but not including padding (if any).

Characters (variable): If Length is zero, this field MUST be zero bytes in length. If Length is nonzero, this field MUST be a null-terminated array of 16-bit Unicode characters, followed by zero padding to a multiple of 4 bytes. The string represented by this field SHOULD NOT contain embedded or additional trailing null characters.