Package : perl-utf8-all

Package details

Summary: Turn on Unicode - all of it

Description:
the utf8 manpage allows you to write your Perl encoded in UTF-8. That means
UTF-8 strings, variable names, and regular expressions. 'utf8::all' goes
further, and makes '@ARGV' encoded in UTF-8, and filehandles are opened
with UTF-8 encoding turned on by default (including STDIN, STDOUT, STDERR),
and charnames are imported so '\N{...}' sequences can be used to compile
Unicode characters based on names. If you _don't_ want UTF-8 for a
particular filehandle, you'll have to set 'binmode $filehandle'.

The pragma is lexically-scoped, so you can do the following if you had some
reason to:

{
use utf8::all;
open my $out, '>', 'outfile';
my $utf8_str = 'føø bār';
print length $utf8_str, "
"; # 7
print $out $utf8_str; # out as utf8
}
open my $in, '<', 'outfile'; # in as raw
my $text = do { local $/; <$in>};
print length $text, "
"; # 10, not 7!


URL: http://search.cpan.org/dist/utf8-all
License: GPL+ or Artistic

Maintainer: nobody

List of RPMs