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
Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
Wanted to see it, but they wouldn't reschedule it
Read the book instead
Results (252 votes). Check out past polls.