view bin/toutf8 @ 4566:1b161db44445

<fizzie> mv data/8ballreplies share/; sed -i -e \'s/data/share/\' bin/8*ball; rmdir data # going to hit some empty-directory problem again, I\'m sure
author HackBot
date Tue, 15 Apr 2014 10:28:33 +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'))