add non-ascii tests - improve to_unicode function

The hardcoded utf8 isn't really nice but that was already the case...
Maybe sys.stdout.encoding (or sys.stderr.encoding...) should be used.