Help for this page

Select Code to Download


  1. or download this
    use utf8; # All hard-coded strings will be assumed to be UTF-8
    my $temp = encode( "iso-8859-1", 'Köln' );
    ...
    
  2. or download this
    my $temp = encode( "iso-8859-1", decode("UTF-8", 'Köln') );
    ...
    
  3. or download this
    # Files (change input encoding to match file encoding):
    open my $F, "<:encoding(UTF-8)", "myfile" or die "Error reading myfile
    +: $!";
    ...
    # Or, command-line args is an appropriate use of Encode::Locale
    use Encode::Locale;
    my $arg = decode("locale", $ARGV[0]);