3 # USAGE: perl mkeastasianwidth.pl > charwidth.c
7 my $fh=new IO
::File
"<EastAsianWidth.txt";
12 print "static const unicode_char unicode_wcwidth_tab[][2]={\n";
24 printf ("{0x%04x, 0x%04x},\n", $pb, $pe) unless $pb < 0;
31 while (defined($_=<$fh>))
38 grep {s/^\s*//; s/\s*$//; } @w;
40 next unless $w[1] eq "F" || $w[1] eq "W";
42 if ($w[0] =~ /(.*)\.\.(.*)/)
52 printf ("{0x%04x, 0x%04x}\n};\n", $pb, $pe);