include "sys.m"; sys := load Sys Sys->PATH; byte2char: fn(buf: array of byte, n: int): (int, int, int); char2byte: fn(c: int, buf: array of byte, n: int): int;
Char2byte performs the inverse of byte2char. It translates a Unicode character, c, to a UTF byte sequence, which is placed in successive bytes starting at buf[.IRn]. The longest UTF sequence for a single Unicode character is Sys->UTFmax (3) bytes. If the translation succeeds, char2byte returns the number of bytes placed in the buffer. If the buffer is too small to hold the result, char2byte returns zero and leaves the array unchanged.
|SYS-BYTE2CHAR(2 )||Rev: Thu Feb 15 14:43:27 GMT 2007|