comparison bin/toutf8 @ 9075:c989a1669243

<fizzie> revert 58b9ee8f97a7
author HackBot
date Sun, 25 Sep 2016 20:31:46 +0000
parents e037173e0012
children
comparison
equal deleted inserted replaced
9074:560a73f4f0a4 9075:c989a1669243
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'))