view bin/toutf8 @ 12523:67a2e5342dad draft default tip

<b_jonas> learn The password of the month is outside the scope of this wisdom entry.
author HackEso <hackeso@esolangs.org>
date Tue, 01 Apr 2025 08:17:53 +0100
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'))