properly preserve encoding in output

How can this bug have been undetected? Weird.
bump version