Using Perl, I try to execute lowercase words with accents and special characters with lc(), but I cannot.
lc()
For instance:
É UM MAÇO
returns
É um maÇo
-bash$ perl -we 'use utf8; binmode STDOUT, ":utf8"; print lc "É UM MAÇO"' é um maço
utf8indicates that your program text is unicode. binmodeprovides the correct output of wide characters.
utf8
binmode
You can also use Encode;see docs .
use Encode;
Try to add
use locale;
into your script. He must perform various functions, including lc, with emphasis. Full testing script:
lc
use strict; use warnings; use locale; use utf8; print lc('É UM MAÇO'); # gives "é um maço"
http://perldoc.perl.org/functions/lc.html , . , .