view bin/toutf8 @ 6291:f0abe1320ff3

<tswett> echo \'There is a way out. Finding it will be difficult. It may be the hardest thing you\'\\\'\'ve ever done. Find it anyway.\' > good/544
author HackBot
date Fri, 27 Nov 2015 01:45:53 +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'))