Perl UnicodeEastAsianWidth Packaging for Opensuse

W
Shared by: bzs12927
-
Stats
views:
8
posted:
2/1/2010
language:
English
pages:
1
Document Sample
scope of work template
							          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