Hi all,

I'm trying to change case of UTF-8 strings. I've read a bunch of
documentation, but can't figure out how to do it right. Here is an
example:

=== My code:
use strict;
use utf8;

my $line;
my $letter;

while ($line = <STDIN>) {
    chomp($line);
    utf8::upgrade($line);
    $line = lc($line);
    print "${line}\n";
}
=== Data file:
ANDRÉ DA SILVA
ÂNGELO DE SOUZA
=== Execution (perl 5.8.8):
$ ./lower.pl < names > output
=== Output
andr�� da silva
��ngelo de souza
===

As you may notice, I managed to change the special character into
something. But not the corresponding lower case UTF-8 letter. Please
help.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to