#!/bin/bash

if iconv -f UTF-8 -t UTF-8 <$1 &>/dev/null
then
    echo UTF-8
else
    echo ISO-8859-1
fi
