view bin/toutf8 @ 6623:a7f8243c5cf0

<mroman> learn Superduperinteressantesandersonnegelegenesdorfmitoderohnesahneistunsdabeiabsolutscheissegal is where mroman lives.
author HackBot
date Fri, 29 Jan 2016 11:21:15 +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'))