esi-utf

esi-utf Library to convert between UTF8 and UTF16 an extension to UTF32 might be possible in the future.

Dependencies

library version inmation core library

esi-class

2.0.0

yes

Available functions

All functions have to be called according to the ESI standard, using colons, e.g. lib:FUNCTIONNAME(params)

Documentation

UNPACK16(buf,pos,little)

UNPACK16

Parameters

buf

char array / buffer

pos

position to start reading

little

little endian, true if data is stored in little endian.

UTF16TO8(data,little)

Convert UTF16 to UTF8

Parameters

data

the string to convert

little

little endian, set to true if the input is little endian

Returns

returns the UTF 8 string

UTF8TO16(data,little,bom)

Convert UTF8 to UTF16

Parameters

data

the string to convert

little

little endian, set to true if the output shall be little endian

bom

set to true is the output shall start with a Byte Order Mark.

Returns

returns the UTF16 string