comparison bin/toutf8 @ 0:e037173e0012

Initial import.
author HackBot
date Thu, 16 Feb 2012 19:42:32 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e037173e0012
1 #!/usr/bin/python
2 import sys
3 import chardet
4 x = sys.stdin.read()
5 enc = chardet.detect(x)['encoding']
6 sys.stdout.write(x.decode(enc).encode('UTF-8'))