output uses UTF-8 encoding