Decodes a UTF-8 encoded byte stream into a WString
LGF_DecodeUtf8 (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
Array[*] of Byte | byteStream | Ret_Val | Word | |||||
DInt | startPos | |||||||
UInt | count | |||||||
WString | decodedString | WString | ||||||
Identifier | Data type | Description |
---|---|---|
byteStream | Array[*] of Byte | UTF-8 encoded byte stream |
startPos | DInt | Position in byte stream to start decoding from |
count | UInt | Number of character (not bytes) to decode; 0: byte stream is decoded until end |
Identifier | Data type | Description |
---|---|---|
Ret_Val | Word | 16#0000 - 16#7FFF: Status of the FC, 16#8000 - 16#FFFF: Error identification |
Identifier | Data type | Description |
---|---|---|
decodedString | WString | Decoded string |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_NO_ERROR Status: No error |
16#7FFD | WARN_UNSUPPORTED_CHAR Warning: Byte stream was decoded but contained unsupported characters |
16#7FFE | WARN_STREAM_EXCEEDS_MAX_LEN Warning: Byte stream exceeds max. length of the string at parameter `decodedString` |
16#8201 | ERR_START_POS_OUTSIDE Error: Parameter `startPos` is outside array bounds |
16#8202 | ERR_COUNT_EXCEEDS_BOUNDS Error: Parameter `count` is outside array bounds |
16#8203 | ERR_COUNT_EXCEEDS_MAX_LEN Error: Parameter `count` exceeds max. length of a WString |
Version & Date | Change description | |
---|---|---|
01.00.00 | Online Support | |
2022-12-16 | First released version |