Mercurial > repo
view bin/toutf8 @ 737:fecf2d14c4bf
<oerjan> addquote <oklopol> t <oklopol> y <oklopol> also i didn't say t\ny on purpose, i just accidentally hit the keyboard with my head
author | HackBot |
---|---|
date | Thu, 04 Oct 2012 20:51:39 +0000 |
parents | e037173e0012 |
children |
line wrap: on
line source
#!/usr/bin/python import sys import chardet x = sys.stdin.read() enc = chardet.detect(x)['encoding'] sys.stdout.write(x.decode(enc).encode('UTF-8'))