5.16.3.4 Object(Presentation-Address)
To convert from the LDAP representation to the SYNTAX_ADDRESS representation, the UTF-8 encoded string is converted to a UCS-16 encoded Unicode string. The resulting string is not null-terminated. The dataLen field of SYNTAX_ADDRESS equals the length of the Unicode string in bytes, plus 4. The valLen field of ATTRVAL equals the dataLen field of SYNTAX_ADDRESS.
Example:
-
LDAP value: 12345 (Unicode string encoded as UTF-8) This represents the following SYNTAX_ADDRESS struct: +0x000 dataLen : 0xe +0x004 uVal : L"12345" valLen: 14 payload: 0e 00 00 00 31 00 32 00 33 00 34 00 35 00 ....1.2.3.4.5.