view bin/toutf8 @ 5671:17079c93fbf4

<FireFly> ` echo $\'#!/bin/sh\\nwisdom | d\xc3\xb6ts\' >bin/wisd\xc3\xb6m && chmod a+x bin/wisd\xc3\xb6m
author HackBot
date Wed, 24 Jun 2015 14:29:57 +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'))