The main problem is that if it's just a plain text file, there's no reliable way of telling what encoding is in use.
FTP provides no metadata to indicate this, and operating systems usually don't store any on their filesystem either.
Some files contain a byte order mark, which will indicate if the file is UTF-8, or UTF-16, but otherwise, you're just going to have to guess.
One option would be to assume the file is in utf-8, and if it contains invalid UTF-8 sequences, then assume it's latin1.
But that does nothing to cater for other 8-bit character sets (e.g. latin2, cyrillic etc), or more exotic ones (big5, shift-jis)
Mark