view bin/toutf8 @ 6077:95fa8ec1e331

<ais523> asm lea 0x1234, %al
author HackBot
date Fri, 16 Oct 2015 23:44:30 +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'))