view bin/toutf8 @ 2339:d693544a0ef5

<oerjan> sed -i "6ap=list(re.sub(\'C+\',\'C\',\'\'.join(p)))" bin/colorize
author HackBot
date Fri, 01 Mar 2013 03:37:10 +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'))