view bin/toutf8 @ 11781:da7b0402a2d7 draft

<oerjan> slwd brexit//s,pead,peated,
author HackEso <hackeso@esolangs.org>
date Thu, 11 Apr 2019 05:08:37 +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'))