view bin/toutf8 @ 9291:facea1455b05

<ais523> addquote <fungot> boily: i walked 5 miles to get to http://community.schemewiki.org from there. but it\'s written in a relatively portable style?
author HackBot
date Sat, 15 Oct 2016 16:07:31 +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'))