Support for writing UTF-8 (unicode file stream, text mode).
Moved the UTF-8 parser out to a macro. It's not a pretty macro.
UTF-8 forms of gli_get_line/char/buffer.