view bin/from-8bit @ 10243:1a0faf9f2dd4

<shachaf> sedlast s/.$/ yet&/
author HackBot
date Mon, 13 Feb 2017 08:39:00 +0000
parents 7f957c1f4661
children
line wrap: on
line source

#!/bin/bash

enc=$(echo "$1" | iconv -t iso8859-1 | chardet | awk '{print $2}')
echo "$1" | iconv -t iso8859-1 | iconv -f "$enc"