Right now, the only charsets that are supported are UTF8 and ISO/IEC 8859-1. Since I have a lot of data to encode, I can get a more efficient output by directly writing a stream of bytes.