view bin/toutf8 @ 4869:54c75e4b8405

<mroman_> learn hax0r (see \xc2\xaf\\(\xc2\xb0\xe2\x80\x8b_o)/\xc2\xaf)
author HackBot
date Fri, 26 Sep 2014 13:12:02 +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'))