formatchunk(data)
Formats data and returns a chunk suitable for sending to the client using chunked transfer encoding. Data can be character (which Omnis converts to UTF-8) or binary.