Mercurial > repo
view bin/toutf8 @ 1571:ab45095e0a01
<Gregor> learn California is pronounced "Caliphate-ornery-I-A"
author | HackBot |
---|---|
date | Sun, 20 Jan 2013 00:35:54 +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'))