in reply to Re: possible missunderstanding of package Encode
in thread possible missunderstanding of package Encode

Dear Dean,

you are my hero of the day!. This was just what I needed to handle the variable/input. I put this in my test-scipt and the output opened my eyes:

#!/usr/bin/perl use v5.10; use Encode; use Data::Dumper; my $temp = encode( "iso-8859-1", 'Köln' ); say Dumper "========== encode string =========="; say $temp, "(", length($temp), ")"; my $VUOrt0 = 'Köln'; $temp = encode( "iso-8859-1", $VUOrt0 ); say Dumper "========== encode scalar variable =========="; say $temp, "(", length($temp), ")"; $temp = encode( "iso-8859-1", decode("UTF-8", $VUOrt0) ); say Dumper "========== decode encode scalar variable =========="; say $temp, "(", length($temp), ")"; if ( $temp =~ /ö/ ) { say "habe 'ö' gefunden"; } else { say "habe 'ö' +NICHT gefunden"; } if ( $temp =~ /\xF6/ ) { say "habe '\xF6' gefunden"; } else { say "hab +e '\xF6' NICHT gefunden"; } for ( my $i = 0; $i < length($temp); $i++ ) { say substr( $temp, $i, 1), "(", length(substr( $temp, $i, 1)), ")" +; }

If you might run the script, you see, what i mean. To answer your assumption was right. I am working in a virtualbox with Ubuntu 13.10. My editor is geany and the default justification seams to be UTF-8. I checked this on several used scripts. The shell is simply the terminal.

Many thanks and have a nice day, Thomas