view bin/toutf8 @ 6046:4b7ec1c56f5b

<int-e> ` rm fshg test
author HackBot
date Sat, 03 Oct 2015 18:35:16 +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'))