in reply to Playing with extended chars
My recommendation is to use perl 5.8.0 or more recent and look at perldoc Encode, perldoc open, and perldoc -f open. If tr doesn't work because you have the characters encoded in two bytes, you can do
$s = decode_utf8($s);
That will convert the string into the internal representation where characters are characters and you don't have to worry about how many bytes they need for encoding.
The first attemp works like this:
perl -e '$_="áéíóú";tr/áéíóú/aeiou/;print'
BTW, encode and decode functions return values that make me think that the string is well formed, and that is tr// who's making wrong things. Am I too lost?
$s = 'holÃ¡Ã©ÃÃ³Ãºon';
$s =~ tr/Ã¡Ã©ÃÃ³Ãº/aeiou/;
# prints holaeiouon
.desrever si txet eritne ehT
.backwards are (letters the not but) words the Only
ehT sdrow era ni redro, tub eht srettel era eht rehto yaw.
Who ndees baacdkrws wehn you have Tceilmopgyya?
?wdors reeersvd up meixd about How
.tusnnmihep rof nuttolg a m'I
Results (441 votes). Check out past polls.