fixed output encoding if LC_CTYPE locale is not utf8
Merge pull request #34 from crate/h/print-encoding

fixed output encoding if LC_CTYPE locale is not utf8