Perl UnicodeEastAsianWidth Packaging for Opensuse
Document Sample


Perl Unicode::EastAsianWidth
Packaging for Opensuse
Hartmut PILCH
http://a2e.de/adv/pak/perl-Unicode-EastAsianWidth
May 18, 2009
1 Chronology
1.1 2009-04-22 InFullwidth works, InEastAsianFullwidth maybe not
• A test script shows how it works:
#!/usr/bin/perl
# Time-stamp: <2009-04-22 00:13:43 phm>
use Unicode::EastAsianWidth;
use utf8;
²
use Encode qw(encode decode);
my $str = ’ ’;
($val) = $str =~ m(\A(\p{InEastAsianWide}+)\Z);
print encode(’UTF-8’, $val), "\n";
$str = ’ ’;
($val) = $str =~ m((\p{InFullwidth}{2}+));
print encode(’UTF-8’, $val), "\n";
• Output is
²
• I was not able to figure out what InEastAsianFullwidth matches
• We use this in A2E::Mktdir to allow us to require certain document metadata to
be written in wide characters
2 Resources
• test.pl
1
Related docs
Get documents about "