Linux Community
file --mime file.txt outputs the mime information which includes the encoding.
file --mime file.txt
dev-haskell/iconv http://hackage.haskell.org/package/iconv String encoding conversion
app-i18n/enca http://gitorious.org/enca ENCA detects the character coding of a file and converts it if desired
Within a bash script, how to test the encoding of a file and convert the encoding if necessary?