view bin/toutf8 @ 6076:6ff2448dbb57

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