Platform Package reference: Function EwStringToUtf8()

Description of the function EwStringToUtf8() available in all Platform Packages for ANSI C compatible target systems. This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.


XInt32 EwStringToUtf8


  XString        aString,

  unsigned char* aDest,

  XInt32         aCount




Pointer to the wide-character (16-bit per character) string to convert in UTF-8 format.


Pointer to the destination memory, where the converted 8-bit UTF-8 string should be stored in. This memory area has to be at least aCount bytes large.


The number of bytes within aDest available for the operation.


The function EwStringToUtf8() converts the characters from the given 16-bit wide-character string aString to an 8-bit UTF-8 string and stores it in the memory area aDest. The resulted string is terminated by the zero byte 0x00. The function returns the number of bytes written in aDest incl. the last zero terminator sign 0x00.