[Bug 157071] Perl doesn't lovercase accented caracters in UTF-8

bugzilla at redhat.com bugzilla at redhat.com
Tue Nov 8 22:32:34 UTC 2005


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Perl doesn't lovercase accented caracters in UTF-8


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=157071


jvdias at redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |CLOSED
         Resolution|                            |NOTABUG




------- Additional Comments From jvdias at redhat.com  2005-11-08 17:32 EST -------
Yes, I know the perl unicode implementation is far from user-friendly
or intuitive - this is an upstream issue that is being addressed - but
it does work (just) if used correctly .

perl's lc / uc DO work for UTF-8, IF the UTF-8 is properly encoded, AND perl is
running in wide-character mode , AND the characters have defined  upper/lower
case counterparts in your current locale.

These examples should expose the issues - I suggest you also read the 
perlunicode and perllocale man-pages .

$ perl -C -e 'use locale; use utf8; use Encode qw(decode); 
$s=decode(utf8,"\xc5\x99\xc4\x9b"); print uc $s,"\n";'
ŘĚ

$ perl -C -e 'use locale; use utf8; use Encode qw(decode); 
$s=decode(utf8,"\xc5\x99\xc4\x9b"); print  $s,"\n";'
řě

$ perl -e 'use Encode qw(decode);  $s=decode(utf8,"\xc5\x99\xc4\x9b"); print 
$s,"\n";'
Wide character in print at -e line 1.
řě

$ perl -C -e 'use Encode qw(decode);  $s=decode(utf8,"\xc5\x99\xc4\x9b"); print
 $s,"\n";'
řě

$ PERL_UNICODE=31 perl -e 'use Encode qw(decode);
$s=decode(utf8,"\xc5\x99\xc4\x9b"); print uc $s,"\n";'
ŘĚ

$ PERL_UNICODE=31 perl -e 'use Encode qw(decode);  $s=decode(utf8,"ŘĚ"); print
lc $s,"\n";'
řě




-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the Fedora-perl-devel-list mailing list