ConvertUTF8toUTF16 (FUN)
FUNCTION ConvertUTF8toUTF16 : UDINT
This function converts an UTF-8 encoded string to an UTF-16 encoded string (may be wrong for 3 or 4 character encoded UTF16 characters).
- InOut:
Scope
Name
Type
Comment
Return
ConvertUTF8toUTF16UDINTInput
sourceStartPOINTER TO BYTE
Pointer to the UTF-8 string to convert
targetStartPOINTER TO WORD
Pointer to the WSTRING the result shall be stored in
dwTargetBufferSizeDWORDThe size (in bytes) of the buffer (targetStart) the result shall be stored in
bStrictConversionBOOLDo not continue on illegal characters