Added support for UTF-8 output.