use Text::Iconv; my $enc= 'latin1'; # or any other encoding supported by iconv, iconv --list gives the list my $enc2utf = new Text::Iconv( $enc, 'utf8') or die "Can't create enc2utf converter"; my $utf2enc= new Text::Iconv( 'utf8', $enc) or die "Can't create utf2enc converter"; # then you can convert strings like this: my $utf8_string= $enc2utf->convert( $enc_string); my $enc_string= $utf2enc->convert( $utf8_string);