view bin/toutf8 @ 11994:df4d38e8e979 draft

<oerjan> sled bin/asmbf//s/^/print_args_or_input "$@" |/
author HackEso <hackeso@esolangs.org>
date Fri, 25 Oct 2019 21:18:24 +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'))