VgaGames 3 - Miscellaneous man-pages

[.. upper level ..]

VG3_utf8_to_iso()

Convert an UTF-8 text to an ISO-8895-1 text to use it with fontfiles.
SYNTAX
char * VG3_utf8_to_iso(const char *text, char *rbuf, size_t rsize)

FUNCTION PARAMETERS
text UTF-8 text (may also be already an ISO-8859-1 text)
rbuf For returning converted ISO-8859-1 text
May be a pointer to text, or NULL = return allocated text
rsize Size of rbuf

RETURN VALUE
Returns a pointer to rbuf or an allocated text.

DESCRIPTION
Convert an UTF-8 text to an ISO-8895-1 text. As a text of struct vg3_text uses a fontfile of 256 characters, every text must be presented by these characters. An UTF-8 text uses sometimes more than one byte to represent a character, so with this function it can be converted to a character map containing just one byte per character which can be mapped to a fontfile.