in reply to Converting UTF8 to Latin1

Read perlunitut: Unicode in Perl#I/O flow (the actual 5 minute tutorial) and learn the magic incantation, decode input, encode output

Is there a way to automatically decode or encode?

Why yes , use io encoding layers :)