view bin/toutf8 @ 7388:2853bce44bba

<oerjan> le/rn soviet russia/\xc2\xaf\\(\xc2\xb0\xe2\x80\x8b_o)/\xc2\xaf soviet russia?
author HackBot
date Thu, 14 Apr 2016 23:24:26 +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'))