diff options
| author | fukachan <fukachan> | 2012-02-19 09:22:41 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2012-02-19 09:22:41 +0000 |
| commit | 22fd3f8b8ff9693cf840ff1d78d3dcc5aa2a087f (patch) | |
| tree | bb27ce1133755f140e920c520e6c5bf356b53699 /cpan | |
| parent | 3df4116618fd1f5f5bb00181e21503c7972787e2 (diff) | |
| download | fml8-22fd3f8b8ff9693cf840ff1d78d3dcc5aa2a087f.tar.gz fml8-22fd3f8b8ff9693cf840ff1d78d3dcc5aa2a087f.tar.bz2 fml8-22fd3f8b8ff9693cf840ff1d78d3dcc5aa2a087f.zip | |
Jcode 2.07
Diffstat (limited to 'cpan')
| -rw-r--r-- | cpan/dist/Jcode/Jcode.pm | 1163 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Jcode/Constants.pm | 23 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Jcode/H2Z.pm | 6 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Jcode/Tr.pm | 15 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Jcode/Unicode/Constants.pm | 6 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Jcode/Unicode/NoXS.pm | 6 | ||||
| -rw-r--r-- | cpan/dist/Jcode/MANIFEST | 24 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Makefile.PL | 16 | ||||
| -rw-r--r-- | cpan/dist/Jcode/README | 36 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Unicode/Unicode.pm | 54 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Unicode/Unicode.xs | 46 | ||||
| -rw-r--r-- | cpan/dist/Jcode/Unicode/uni.c | 424 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/benchmark.pl | 49 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/convert.t | 154 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/getcode.t | 102 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/h2z.t | 44 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/mime.t | 8 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/new.t | 144 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/tr.t | 85 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/unibench.pl | 70 | ||||
| -rw-r--r-- | cpan/dist/Jcode/t/x0212.euc | 488 |
21 files changed, 1438 insertions, 1525 deletions
diff --git a/cpan/dist/Jcode/Jcode.pm b/cpan/dist/Jcode/Jcode.pm index e752b181..d7c3edfd 100644 --- a/cpan/dist/Jcode/Jcode.pm +++ b/cpan/dist/Jcode/Jcode.pm @@ -1,282 +1,420 @@ # -# $Id: Jcode.pm,v 0.83 2003/03/16 16:15:34 dankogai Exp dankogai $ +# $Id: Jcode.pm,v 2.7 2008/05/10 18:15:19 dankogai Exp dankogai $ # -=head1 NAME - -Jcode - Japanese Charset Handler - -=head1 SYNOPSIS - - use Jcode; - # - # traditional - Jcode::convert(\$str, $ocode, $icode, "z"); - # or OOP! - print Jcode->new($str)->h2z->tr($from, $to)->utf8; - -=cut - -=head1 DESCRIPTION - -Jcode.pm supports both object and traditional approach. -With object approach, you can go like; - -$iso_2022_jp = Jcode->new($str)->h2z->jis; - -Which is more elegant than; - -$iso_2022_jp = &jcode::convert(\$str,'jis',jcode::getcode(\str), "z"); - -For those unfamiliar with objects, Jcode.pm still supports getcode() -and convert(). - -=cut - package Jcode; -use 5.004; +use 5.005; # fair ? use Carp; use strict; use vars qw($RCSID $VERSION $DEBUG); -$RCSID = q$Id: Jcode.pm,v 0.83 2003/03/16 16:15:34 dankogai Exp dankogai $; -$VERSION = do { my @r = (q$Revision: 0.83 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: Jcode.pm,v 2.7 2008/05/10 18:15:19 dankogai Exp dankogai $; +$VERSION = do { my @r = (q$Revision: 2.7 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; $DEBUG = 0; +# we no longer use Exporter +use vars qw($USE_ENCODE); +$USE_ENCODE = ($] >= 5.008001); + use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @ISA = qw(Exporter); @EXPORT = qw(jcode getcode); @EXPORT_OK = qw($RCSID $VERSION $DEBUG); -%EXPORT_TAGS = ( all => [ @EXPORT_OK, @EXPORT ] ); - - -use vars qw($USE_CACHE $NOXS); - -$USE_CACHE = 1; -$NOXS = 0; - -print $RCSID, "\n" if $DEBUG; - -use Jcode::Constants qw(:all); +%EXPORT_TAGS = ( all => [ @EXPORT, @EXPORT_OK ] ); use overload - q("") => sub { ${$_[0]->[0]} }, - q(==) => sub {overload::StrVal($_[0]) eq overload::StrVal($_[1])}, - q(=) => sub { $_[0]->set( $_[1] ) }, + q("") => sub { $_[0]->euc }, + q(==) => sub { overload::StrVal($_[0]) eq overload::StrVal($_[1]) }, q(.=) => sub { $_[0]->append( $_[1] ) }, fallback => 1, ; -=head1 Methods - -Methods mentioned here all return Jcode object unless otherwise mentioned. - -=over 4 - -=item $j = Jcode-E<gt>new($str [, $icode]); - -Creates Jcode object $j from $str. Input code is automatically checked -unless you explicitly set $icode. For available charset, see L<getcode> -below. - -The object keeps the string in EUC format enternaly. When the object -itself is evaluated, it returns the EUC-converted string so you can -"print $j;" without calling access method if you are using EUC -(thanks to function overload). +if ($USE_ENCODE){ + $DEBUG and warn "Using Encode"; + my $data = join("", <DATA>); + eval $data; + $@ and die $@; +}else{ + $DEBUG and warn "Not Using Encode"; + require Jcode::_Classic; + use vars qw/@ISA/; + unshift @ISA, qw/Jcode::_Classic/; + for my $sub (qw/jcode getcode convert load_module/){ + no strict 'refs'; + *{$sub} = \&{'Jcode::_Classic::' . $sub }; + } + for my $enc (qw/sjis jis ucs2 utf8/){ + no strict 'refs'; + *{"euc_" . $enc} = \&{"Jcode::_Classic::" . "euc_" . $enc}; + *{$enc . "_euc"} = \&{"Jcode::_Classic::" . $enc . "_euc"}; + } +} -=item Passing Reference +1; +__DATA__ +# +# This idea was inspired by JEncode +# http://www.donzoko.net/cgi/jencode/ +# +package Jcode; +use Encode; +use Encode::Alias; +use Encode::Guess; +use Encode::JP::H2Z; +use Scalar::Util; # to resolve from_to() vs. 'constant' issue. + +my %jname2e = ( + sjis => 'shiftjis', + euc => 'euc-jp', + jis => '7bit-jis', + iso_2022_jp => 'iso-2022-jp', + ucs2 => 'UTF-16BE', + ); + +my %ename2j = reverse %jname2e; + +our $FALLBACK = Encode::LEAVE_SRC; +sub FB_PERLQQ() { Encode::FB_PERLQQ() }; +sub FB_XMLCREF() { Encode::FB_XMLCREF() }; +sub FB_HTMLCREF() { Encode::FB_HTMLCREF() }; +#for my $fb (qw/FB_PERLQQ FB_XMLCREF FB_HTMLCREF/){ +# no strict 'refs'; +# *{$fb} = \&{"Encode::$fb"}; +#} + + +####################################### +# Functions +####################################### + +sub jcode { return __PACKAGE__->new(@_); } -Instead of scalar value, You can use reference as +# +# Used to be in Jcode::Constants +# -Jcode->new(\$str); +my %_0208 = ( + 1978 => '\e\$\@', + 1983 => '\e\$B', + 1990 => '\e&\@\e\$B', + ); +my %RE = ( + ASCII => '[\x00-\x7f]', + BIN => '[\x00-\x06\x7f\xff]', + EUC_0212 => '\x8f[\xa1-\xfe][\xa1-\xfe]', + EUC_C => '[\xa1-\xfe][\xa1-\xfe]', + EUC_KANA => '\x8e[\xa1-\xdf]', + JIS_0208 => "$_0208{1978}|$_0208{1983}|$_0208{1990}", + JIS_0212 => "\e" . '\$\(D', + JIS_ASC => "\e" . '\([BJ]', + JIS_KANA => "\e" . '\(I', + SJIS_C => '[\x81-\x9f\xe0-\xfc][\x40-\x7e\x80-\xfc]', + SJIS_KANA => '[\xa1-\xdf]', + UTF8 => '[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]' + ); -This saves time a little bit. In exchange of the value of $str being -converted. (In a way, $str is now "tied" to jcode object). +sub _max { + my $result = shift; + for my $n (@_){ + $result = $n if $n > $result; + } + return $result; +} -=item $j-E<gt>set($str [, $icode]); +sub getcode { + my $arg = shift; + my $r_str = ref $arg ? $arg : \$arg; + Encode::is_utf8($$r_str) and return 'utf8'; + my ($code, $nmatch, $sjis, $euc, $utf8) = ("", 0, 0, 0, 0); + if ($$r_str =~ /$RE{BIN}/o) { # 'binary' + my $ucs2; + $ucs2 += length($1) + while $$r_str =~ /(\x00$RE{ASCII})+/go; + if ($ucs2){ # smells like raw unicode + ($code, $nmatch) = ('ucs2', $ucs2); + }else{ + ($code, $nmatch) = ('binary', 0); + } + } + elsif ($$r_str !~ /[\e\x80-\xff]/o) { # not Japanese + ($code, $nmatch) = ('ascii', 1); + } # 'jis' + elsif ($$r_str =~ + m[ + $RE{JIS_0208}|$RE{JIS_0212}|$RE{JIS_ASC}|$RE{JIS_KANA} + ]ox) + { + ($code, $nmatch) = ('jis', 1); + } + else { # should be euc|sjis|utf8 + # use of (?:) by Hiroki Ohzaki <ohzaki@iod.ricoh.co.jp> + $sjis += length($1) + while $$r_str =~ /((?:$RE{SJIS_C})+)/go; + $euc += length($1) + while $$r_str =~ /((?:$RE{EUC_C}|$RE{EUC_KANA}|$RE{EUC_0212})+)/go; + $utf8 += length($1) + while $$r_str =~ /((?:$RE{UTF8})+)/go; + # $utf8 *= 1.5; # M. Takahashi's suggestion + $nmatch = _max($utf8, $sjis, $euc); + carp ">DEBUG:sjis = $sjis, euc = $euc, utf8 = $utf8" if $DEBUG >= 3; + $code = + ($euc > $sjis and $euc > $utf8) ? 'euc' : + ($sjis > $euc and $sjis > $utf8) ? 'sjis' : + ($utf8 > $euc and $utf8 > $sjis) ? 'utf8' : undef; + } + return wantarray ? ($code, $nmatch) : $code; +} -Sets $j's internal string to $str. Handy when you use Jcode object repeatedly -(saves time and memory to create object). +sub convert{ + my $r_str = (ref $_[0]) ? $_[0] : \$_[0]; + my (undef,$ocode,$icode,$opt) = @_; + Encode::is_utf8($$r_str) and utf8::encode($$r_str); + defined $icode or $icode = getcode($r_str) or return; + $icode eq 'binary' and return $$r_str; - # converts mailbox to SJIS format - my $jconv = new Jcode; - $/ = 00; - while(<>){ - print $jconv->set(\$_)->mime_decode->sjis; - } + $jname2e{$icode} and $icode = $jname2e{$icode}; + $jname2e{$ocode} and $ocode = $jname2e{$ocode}; -=item $j-E<gt>append($str [, $icode]); + if ($opt){ + return $opt eq 'z' + ? jcode($r_str, $icode)->h2z->$ocode + : jcode($r_str, $icode)->z2h->$ocode ; + + }else{ + if (Scalar::Util::readonly($$r_str)){ + my $tmp = $$r_str; + Encode::from_to($tmp, $icode, $ocode); + return $tmp; + }else{ + Encode::from_to($$r_str, $icode, $ocode); + return $$r_str; + } + } +} -Appends $str to $j's internal string. +####################################### +# Constructors +####################################### -=back +sub new{ + my $class = shift; + my $self = {}; + bless $self => $class; + defined $_[0] or $_[0] = ''; + $self->set(@_); +} -=cut +sub set{ + my $self = shift; + my $str = $_[0]; + my $r_str = (ref $str) ? $str : \$str; + my $code = $_[1] if(defined $_[1]); + my $icode = $code || getcode($r_str) || 'euc'; + $self->{icode} = $jname2e{$icode} || $icode; + # binary and flagged utf8 are stored as-is + unless (Encode::is_utf8($$r_str) || $icode eq 'binary'){ + $$r_str = decode($self->{icode}, $$r_str); + } + $self->{r_str} = $r_str; + $self->{nmatch} = 0; + $self->{method} = 'Encode'; + $self->{fallback} = $FALLBACK; + $self; +} -sub new { - my $class = shift; - my ($thingy, $icode) = @_; - my $r_str = ref $thingy ? $thingy : \$thingy; - my $nmatch; - ($icode, $nmatch) = getcode($r_str) unless $icode; - convert($r_str, 'euc', $icode); - my $self = [ - $r_str, - $icode, - $nmatch, - ]; - carp "Object of class $class created" if $DEBUG >= 2; - bless $self, $class; +sub append{ + my $self = shift; + my $str = $_[0]; + my $r_str = (ref $str) ? $str : \$str; + my $code = $_[1] if(defined $_[1]); + my $icode = $code || getcode($r_str) || 'euc'; + $self->{icode} = $jname2e{$icode} || $icode; + # binary and flagged utf8 are stored as-is + unless (Encode::is_utf8($$r_str) || $icode eq 'binary'){ + $$r_str = decode($self->{icode}, $$r_str); + } + ${ $self->{r_str} } .= $$r_str; + $self->{nmatch} = 0; + $self->{method} = 'internal'; + $self; } -sub r_str { $_[0]->[0] } -sub icode { $_[0]->[1] } -sub nmatch { $_[0]->[2] } +####################################### +# Accessors +####################################### -sub set { - my $self = shift; - my ($thingy, $icode) = @_; - my $r_str = ref $thingy ? $thingy : \$thingy; - my $nmatch; - ($icode, $nmatch) = getcode($r_str) unless $icode; - convert($r_str, 'euc', $icode); - $self->[0] = $r_str; - $self->[1] = $icode; - $self->[2] = $nmatch; - return $self; +for my $method (qw/r_str icode nmatch error_m error_r error_tr/){ + no strict 'refs'; + *{$method} = sub { $_[0]->{$method} }; } -sub append { +sub fallback{ my $self = shift; - my ($thingy, $icode) = @_; - my $r_str = ref $thingy ? $thingy : \$thingy; - my $nmatch; - ($icode, $nmatch) = getcode($r_str) unless $icode; - convert($r_str, 'euc', $icode); - ${$self->[0]} .= $$r_str; - $self->[1] = $icode; - $self->[2] = $nmatch; + @_ or return $self->{fallback}; + $self->{fallback} = $_[0]|Encode::LEAVE_SRC; return $self; } -=over 4 - -=item $j = jcode($str [, $icode]); - -shortcut for Jcode->new() so you can go like; - -$sjis = jcode($str)->sjis; - -=item $euc = $j-E<gt>euc; - -=item $jis = $j-E<gt>jis; +####################################### +# Converters +####################################### -=item $sjis = $j-E<gt>sjis; - -What you code is what you get :) - -=item $iso_2022_jp = $j-E<gt>iso_2022_jp +sub utf8 { encode_utf8( ${$_[0]->{r_str}} ) } -Same as $j->z2h->jis. -Hankaku Kanas are forcibly converted to Zenkaku. - -=back +# +# Those supported in Jcode 0.x are defined as default +# -=cut +for my $enc (keys %jname2e){ + no strict 'refs'; + my $name = $jname2e{$enc} || $enc; + my $e = find_encoding($name) or croak "$enc not supported"; + *{$enc} = sub { + my $r_str = $_[0]->{r_str}; + Encode::is_utf8($$r_str) ? + $e->encode($$r_str, $_[0]->{fallback}) : $$r_str; + }; +} -sub jcode { return Jcode->new(@_) } -sub euc { return ${$_[0]->[0]} } -sub jis { return &euc_jis(${$_[0]->[0]})} -sub sjis { return &euc_sjis(${$_[0]->[0]})} -sub iso_2022_jp{return $_[0]->h2z->jis} +# +# The rest is defined on the fly +# -=over 4 +sub DESTROY {}; -=item [@lines =] $jcode-E<gt>jfold([$bytes_per_line, $newline_str]); +sub AUTOLOAD { + our $AUTOLOAD; + my $self = shift; + my $type = ref $self + or confess "$self is not an object"; + my $myname = $AUTOLOAD; + $myname =~ s/.*:://; # strip fully-qualified portion + $myname eq 'DESTROY' and return; + my $e = find_encoding($myname) + or confess __PACKAGE__, ": unknown encoding: $myname"; + $DEBUG and warn ref($self), "->$myname defined"; + no strict 'refs'; + *{$myname} = + sub { + my $str = ${ $_[0]->{r_str} }; + Encode::is_utf8($str) ? + $e->encode($str, $_[0]->{fallback}) : $str; + }; + $myname->($self); +} -folds lines in jcode string every $bytes_per_line (default: 72) -in a way that does not clobber the multibyte string. -(Sorry, no Kinsoku done!) -with a newline string spified by $newline_str (default: \n). +####################################### +# Length, Translation and Fold +####################################### -=back +sub jlength{ + length( ${$_[0]->{r_str}} ); +} -=cut +sub tr{ + my $self = shift; + my $str = ${$self->{r_str}}; + my $from = Encode::is_utf8($_[0]) ? $_[0] : decode('euc-jp', $_[0]); + my $to = Encode::is_utf8($_[1]) ? $_[1] : decode('euc-jp', $_[1]); + my $opt = $_[2] || ''; + $from =~ s,\\,\\\\,og; $from =~ s,/,\\/,og; + $to =~ s,\\,\\\\,og; $to =~ s,/,\\/,og; + $opt =~ s,[^a-z],,og; + my $match = eval qq{ \$str =~ tr/$from/$to/$opt }; + if ($@){ + $self->{error_tr} = $@; + return $self; + } + $self->{r_str} = \$str; + $self->{nmatch} = $match || 0; + return $self; +} sub jfold{ my $self = shift; - my ($bpl, $nl) = @_; - $bpl ||= 72; - $nl ||= "\n"; - my $r_str = $self->[0]; - my (@lines, $len, $i); - while ($$r_str =~ - m/($RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|[\x00-\xff])/sgo) - { - if ($len + length($1) > $bpl){ # fold! - $i++; - $len = 0; + my $r_str = $self->{r_str}; + my $bpl = shift || 72; + my $nl = shift || "\n"; + my $kin = shift; + + my @lines = (); + my %kinsoku = (); + my ($len, $i) = (0,0); + + if( defined $kin and (ref $kin) eq 'ARRAY' ){ + %kinsoku = map { my $k = Encode::is_utf8($_) ? + $_ : decode('euc-jp' => $_); + ($k, 1) } @$kin; + } + + while($$r_str =~ m/(.)/sg){ + my $char = $1; + # <UFF61> \xA1 |0 # HALFWIDTH IDEOGRAPHIC FULL STOP + # <UFF9F> \xDF |0 # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK + my $ord = ord($char); + my $clen = $ord < 128 ? 1 + : $ord < 0xff61 ? 2 + : $ord <= 0xff9f ? 1 : 2; + if ($len + $clen > $bpl){ + unless($kinsoku{$char}){ + $i++; + $len = 0; + } } - $lines[$i] .= $1; - $len += length($1); + $lines[$i] .= $char; + $len += $clen; } defined($lines[$i]) or pop @lines; $$r_str = join($nl, @lines); - return wantarray ? @lines : $self; -} - -=pod - -=over 4 - -=item $length = $jcode-E<gt>jlength(); -returns character length properly, rather than byte length. + $self->{r_str} = $r_str; + my $e = find_encoding($self->{icode}); + @lines = map { + Encode::is_utf8($_) ? $e->encode($_, $self->{fallback}) : $_ + } @lines; -=back + return wantarray ? @lines : $self; +} -=cut +####################################### +# Full and Half +####################################### -sub jlength { +sub h2z{ my $self = shift; - my $r_str = $self->[0]; - return scalar (my @char = $$r_str =~ m/($RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|[\x00-\xff])/sgo); + my $euc = $self->euc; + Encode::JP::H2Z::h2z(\$euc, @_); + $self->set($euc => 'euc'); + $self; } -=head2 Methods that use MIME::Base64 - -To use methods below, you need MIME::Base64. To install, simply - - perl -MCPAN -e 'CPAN::Shell->install("MIME::Base64")' - -=over 4 - -=item $mime_header = $j-E<gt>mime_encode([$lf, $bpl]); - -Converts $str to MIME-Header documented in RFC1522. -When $lf is specified, it uses $lf to fold line (default: \n). -When $bpl is specified, it uses $bpl for the number of bytes (default: 76; -this number must be smaller than 76). - -=item $j-E<gt>mime_decode; - -Decodes MIME-Header in Jcode object. - -You can retrieve the number of matches via $j->nmatch; +sub z2h{ + my $self = shift; + my $euc = $self->euc; + Encode::JP::H2Z::z2h(\$euc, @_); + $self->set($euc => 'euc'); + $self; +} -=back +####################################### +# MIME-Encoding +####################################### -=cut +sub mime_decode{ + my $self = shift; + my $utf8 = Encode::decode('MIME-Header', $self->utf8); + $self->set($utf8 =>'utf8'); +} sub mime_encode{ my $self = shift; - my $r_str = $self->[0]; + my $str = $self->euc; + my $r_str = \$str; my $lf = shift || "\n"; my $bpl = shift || 76; - my ($trailing_crlf) = ($$r_str =~ /(\n|\r|\x0d\x0a)$/o); - my $str = _mime_unstructured_header($$r_str, $lf, $bpl); + $str = _mime_unstructured_header($$r_str, $lf, $bpl); not $trailing_crlf and $str =~ s/(\n|\r|\x0d\x0a)$//o; $str; } @@ -288,14 +426,14 @@ sub mime_encode{ sub _add_encoded_word { require MIME::Base64; - my($str, $line, $bpl) = @_; + my($str, $line, $lf, $bpl) = @_; my $result = ''; while (length($str)) { my $target = $str; $str = ''; if (length($line) + 22 + ($target =~ /^(?:$RE{EUC_0212}|$RE{EUC_C})/o) * 8 > $bpl) { - $line =~ s/[ \t\n\r]*$/\n/; + $line =~ s/[ \t\n\r]*$/$lf/eo; $result .= $line; $line = ' '; } @@ -307,7 +445,7 @@ sub _add_encoded_word { } my $encoded = '=?ISO-2022-JP?B?' . MIME::Base64::encode_base64($iso_2022_jp, '') - . '?='; + . '?='; if (length($encoded) + length($line) > $bpl) { $target =~ s/($RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|$RE{ASCII})$//o; @@ -345,7 +483,7 @@ sub _mime_unstructured_header { $header .= $word; } } else { - $header = _add_encoded_word($word, $header, $bpl); + $header = _add_encoded_word($word, $header, $lf, $bpl); } $header =~ /(?:.*\n)*(.*)/; if (length($1) == $bpl) { @@ -358,147 +496,313 @@ sub _mime_unstructured_header { $header; } -# see http://www.din.or.jp/~ohzaki/perl.htm#JP_Base64 -#$lws = '(?:(?:\x0d\x0a)?[ \t])+'; -#$ew_regex = '=\?ISO-2022-JP\?B\?([A-Za-z0-9+/]+=*)\?='; -#$str =~ s/($ew_regex)$lws(?=$ew_regex)/$1/gio; -#$str =~ s/$lws/ /go; $str =~ s/$ew_regex/decode_base64($1)/egio; +####################################### +# Matching and Replacing +####################################### + +no warnings 'uninitialized'; + +sub m{ + use utf8; + my $self = shift; + my $r_str = $self->{r_str}; + my $pattern = Encode::is_utf8($_[0]) ? shift : decode("euc-jp" => shift); + my $opt = shift || '' ; + my @match; + + $pattern =~ s,\\,\\\\,og; $pattern =~ s,/,\\/,og; + $opt =~ s,[^a-z],,og; + + eval qq{ \@match = (\$\$r_str =~ m/$pattern/$opt) }; + if ($@){ + $self->{error_m} = $@; + return; + } + # print @match, "\n"; + wantarray ? map {encode('euc-jp' => $_)} @match : scalar @match; +} -sub mime_decode{ - require MIME::Base64; # not use - my $self = shift; - my $r_str = $self->[0]; - my $re_lws = '(?:(?:\r|\n|\x0d\x0a)?[ \t])+'; - my $re_ew = '=\?[Ii][Ss][Oo]-2022-[Jj][Pp]\?[Bb]\?([A-Za-z0-9+/]+=*)\?='; - $$r_str =~ s/($re_ew)$re_lws(?=$re_ew)/$1/sgo; - $$r_str =~ s/$re_lws/ /go; - $self->[2] = - ($$r_str =~ - s/$re_ew/jis_euc(MIME::Base64::decode_base64($1))/ego - ); +sub s{ + use utf8; + my $self = shift; + my $r_str = $self->{r_str}; + my $pattern = Encode::is_utf8($_[0]) ? shift : decode("euc-jp" => shift); + my $replace = Encode::is_utf8($_[0]) ? shift : decode("euc-jp" => shift); + my $opt = shift; + + $pattern =~ s,\\,\\\\,og; $pattern =~ s,/,\\/,og; + $replace =~ s,\\,\\\\,og; $replace =~ s,/,\\/,og; + $opt =~ s,[^a-z],,og; + + eval qq{ (\$\$r_str =~ s/$pattern/$replace/$opt) }; + if ($@){ + $self->{error_s} = $@; + } $self; } +1; +__END__ -=head2 Methods implemented by Jcode::H2Z +=head1 NAME -Methods below are actually implemented in Jcode::H2Z. +Jcode - Japanese Charset Handler -=over 4 +=head1 SYNOPSIS -=item $j-E<gt>h2z([$keep_dakuten]); + use Jcode; + # + # traditional + Jcode::convert(\$str, $ocode, $icode, "z"); + # or OOP! + print Jcode->new($str)->h2z->tr($from, $to)->utf8; -Converts X201 kana (Hankaku) to X208 kana (Zenkaku). -When $keep_dakuten is set, it leaves dakuten as is -(That is, "ka + dakuten" is left as is instead of -being converted to "ga") +=cut -You can retrieve the number of matches via $j->nmatch; +=head1 DESCRIPTION -=item $j-E<gt>z2h; +B<<Japanese document is now available as L<Jcode::Nihongo>. >> -Converts X208 kana (Zenkaku) to X201 kana (Hankaku). +Jcode.pm supports both object and traditional approach. +With object approach, you can go like; -You can retrieve the number of matches via $j->nmatch; + $iso_2022_jp = Jcode->new($str)->h2z->jis; + +Which is more elegant than: + + $iso_2022_jp = $str; + &jcode::convert(\$iso_2022_jp, 'jis', &jcode::getcode(\$str), "z"); + +For those unfamiliar with objects, Jcode.pm still supports C<getcode()> +and C<convert().> + +If the perl version is 5.8.1, Jcode acts as a wrapper to L<Encode>, +the standard charset handler module for Perl 5.8 or later. + +=head1 Methods + +Methods mentioned here all return Jcode object unless otherwise mentioned. + +=head2 Constructors + +=over 2 + +=item $j = Jcode-E<gt>new($str [, $icode]) + +Creates Jcode object $j from $str. Input code is automatically checked +unless you explicitly set $icode. For available charset, see L<getcode> +below. + +For perl 5.8.1 or better, C<$icode> can be I<any encoding name> +that L<Encode> understands. + + $j = Jcode->new($european, 'iso-latin1'); + +When the object is stringified, it returns the EUC-converted string so +you can <print $j> instead of <print $j->euc>. + +=over 2 + +=item Passing Reference + +Instead of scalar value, You can use reference as + +Jcode->new(\$str); + +This saves time a little bit. In exchange of the value of $str being +converted. (In a way, $str is now "tied" to jcode object). =back -=cut +=item $j-E<gt>set($str [, $icode]) -sub h2z { - require Jcode::H2Z; # not use - my $self = shift; - $self->[2] = Jcode::H2Z::h2z($self->[0], @_); - return $self; -} +Sets $j's internal string to $str. Handy when you use Jcode object repeatedly +(saves time and memory to create object). + # converts mailbox to SJIS format + my $jconv = new Jcode; + $/ = 00; + while(<>){ + print $jconv->set(\$_)->mime_decode->sjis; + } -sub z2h { - require Jcode::H2Z; # not use - my $self = shift; - $self->[2] = &Jcode::H2Z::z2h($self->[0], @_); - return $self; -} +=item $j-E<gt>append($str [, $icode]); +Appends $str to $j's internal string. -=head2 Methods implemented in Jcode::Tr +=item $j = jcode($str [, $icode]); -Methods here are actually implemented in Jcode::Tr. +shortcut for Jcode->new() so you can go like; -=over 4 +=back -=item $j-E<gt>tr($from, $to); +=head2 Encoded Strings -Applies tr on Jcode object. $from and $to can contain EUC Japanese. +In general, you can retrieve I<encoded> string as $j-E<gt>I<encoded>. -You can retrieve the number of matches via $j->nmatch; +=over 2 + +=item $sjis = jcode($str)->sjis + +=item $euc = $j-E<gt>euc + +=item $jis = $j-E<gt>jis + +=item $sjis = $j-E<gt>sjis + +=item $ucs2 = $j-E<gt>ucs2 + +=item $utf8 = $j-E<gt>utf8 + +What you code is what you get :) + +=item $iso_2022_jp = $j-E<gt>iso_2022_jp + +Same as C<< $j->h2z->jis >>. +Hankaku Kanas are forcibly converted to Zenkaku. + +For perl 5.8.1 and better, you can also use any encoding names and +aliases that Encode supports. For example: + + $european = $j->iso_latin1; # replace '-' with '_' for names. + +B<FYI>: L<Encode::Encoder> uses similar trick. + +=over 2 + +=item $j-E<gt>fallback($fallback) + +For perl is 5.8.1 or better, Jcode stores the internal string in +UTF-8. Any character that does not map to I<< -E<gt>encoding >> are +replaced with a '?', which is L<Encode> standard. + + my $unistr = "\x{262f}"; # YIN YANG + my $j = jcode($unistr); # $j->euc is '?' + +You can change this behavior by specifying fallback like L<Encode>. +Values are the same as L<Encode>. C<Jcode::FB_PERLQQ>, +C<Jcode::FB_XMLCREF>, C<Jcode::FB_HTMLCREF> are aliased to those +of L<Encode> for convenice. + + print $j->fallback(Jcode::FB_PERLQQ)->euc; # '\x{262f}' + print $j->fallback(Jcode::FB_XMLCREF)->euc; # '☯' + print $j->fallback(Jcode::FB_HTMLCREF)->euc; # '☯' + +The global variable C<$Jcode::FALLBACK> stores the default fallback so you can override that by assigning the value. + + $Jcode::FALLBACK = Jcode::FB_PERLQQ; # set default fallback scheme =back -=cut +=item [@lines =] $jcode-E<gt>jfold([$width, $newline_str, $kref]) -sub tr{ - require Jcode::Tr; # not use - my $self = shift; - $self->[2] = Jcode::Tr::tr($self->[0], @_); - return $self; -} +folds lines in jcode string every $width (default: 72) where $width is +the number of "halfwidth" character. Fullwidth Characters are counted +as two. -# -# load needed module depending on the configuration just once! -# +with a newline string spefied by $newline_str (default: "\n"). -use vars qw(%PKG_LOADED); -sub load_module{ - my $pkg = shift; - return $pkg if $PKG_LOADED{$pkg}++; - unless ($NOXS){ - eval qq( require $pkg; ); - unless ($@){ - carp "$pkg loaded." if $DEBUG; - return $pkg; - } - } - $pkg .= "::NoXS"; - eval qq( require $pkg; ); - unless ($@){ - carp "$pkg loaded" if $DEBUG; - }else{ - croak "Loading $pkg failed!"; - } - $pkg; -} +Rudimentary kinsoku suppport is now available for Perl 5.8.1 and better. -=head2 Methods implemented in Jcode::Unicode +=item $length = $jcode-E<gt>jlength(); -If your perl does not support XS (or you can't C<perl Makefile.PL>, -Jcode::Unicode::NoXS will be used. +returns character length properly, rather than byte length. -See L<Jcode::Unicode> and L<Jcode::Unicode::NoXS> for details +=back -=over 4 +=head2 Methods that use MIME::Base64 -=item $ucs2 = $j-E<gt>ucs2; +To use methods below, you need L<MIME::Base64>. To install, simply -Returns UCS2 (Raw Unicode) string. + perl -MCPAN -e 'CPAN::Shell->install("MIME::Base64")' -=item $ucs2 = $j-E<gt>utf8; +If your perl is 5.6 or better, there is no need since L<MIME::Base64> +is bundled. + +=over 2 + +=item $mime_header = $j-E<gt>mime_encode([$lf, $bpl]) + +Converts $str to MIME-Header documented in RFC1522. +When $lf is specified, it uses $lf to fold line (default: \n). +When $bpl is specified, it uses $bpl for the number of bytes (default: 76; +this number must be smaller than 76). -Returns utf8 String. +For Perl 5.8.1 or better, you can also encode MIME Header as: + + $mime_header = $j->MIME_Header; + +In which case the resulting C<$mime_header> is MIME-B-encoded UTF-8 +whereas C<< $j->mime_encode() >> returnes MIME-B-encoded ISO-2022-JP. +Most modern MUAs support both. + +=item $j-E<gt>mime_decode; + +Decodes MIME-Header in Jcode object. For perl 5.8.1 or better, you +can also do the same as: + + Jcode->new($str, 'MIME-Header') =back -=cut +=head2 Hankaku vs. Zenkaku -sub ucs2{ - load_module("Jcode::Unicode"); - euc_ucs2(${$_[0]->[0]}); -} +=over 2 -sub utf8{ - load_module("Jcode::Unicode"); - euc_utf8(${$_[0]->[0]}); -} +=item $j-E<gt>h2z([$keep_dakuten]) + +Converts X201 kana (Hankaku) to X208 kana (Zenkaku). +When $keep_dakuten is set, it leaves dakuten as is +(That is, "ka + dakuten" is left as is instead of +being converted to "ga") + +You can retrieve the number of matches via $j->nmatch; + +=item $j-E<gt>z2h + +Converts X208 kana (Zenkaku) to X201 kana (Hankaku). + +You can retrieve the number of matches via $j->nmatch; + +=back + +=head2 Regexp emulators + +To use C<< -E<gt>m() >> and C<< -E<gt>s() >>, you need perl 5.8.1 or +better. + +=over 2 + +=item $j-E<gt>tr($from, $to, $opt); + +Applies C<tr/$from/$to/> on Jcode object where $from and $to are +EUC-JP strings. On perl 5.8.1 or better, $from and $to can +also be flagged UTF-8 strings. + +If C<$opt> is set, C<tr/$from/$to/$opt> is applied. C<$opt> must +be 'c', 'd' or the combination thereof. + +You can retrieve the number of matches via $j->nmatch; + +The following methods are available only for perl 5.8.1 or better. + +=item $j-E<gt>s($patter, $replace, $opt); + +Applies C<s/$pattern/$replace/$opt>. C<$pattern> and C<replace> must +be in EUC-JP or flagged UTF-8. C<$opt> are the same as regexp options. +See L<perlre> for regexp options. + +Like C<< $j->tr() >>, C<< $j->s() >> returns the object itself so +you can nest the operation as follows; + + $j->tr("a-z", "A-Z")->s("foo", "bar"); + +=item [@match = ] $j-E<gt>m($pattern, $opt); + +Applies C<m/$patter/$opt>. Note that this method DOES NOT RETURN +AN OBJECT so you can't chain the method like C<< $j->s() >>. + +=back =head2 Instance Variables @@ -510,7 +814,7 @@ FYI, Jcode uses a ref to array instead of ref to hash (common way) to optimize speed (Actually you don't have to know as long as you use access methods instead; Once again, that's OOP) -=over 4 +=over 2 =item $j-E<gt>r_str @@ -530,9 +834,9 @@ Number of matches (Used in $j->tr, etc.) =head1 Subroutines -=over 4 +=over 2 -=item ($code, [$nmatch]) = getcode($str); +=item ($code, [$nmatch]) = getcode($str) Returns char code of $str. Return codes are as follows @@ -558,7 +862,7 @@ jcode::getcode() -- well, almost; is equal to that of SJIS. Jcode::getcode() returns EUC. for Jcode.pm there is no in-betweens. -=item Jcode::convert($str, [$ocode, $icode, $opt]); +=item Jcode::convert($str, [$ocode, $icode, $opt]) Converts $str to char code specified by $ocode. When $icode is specified also, it assumes $icode for input string instead of the one checked by @@ -569,232 +873,10 @@ jcode::convert() ! =back -=cut - -sub getcode { - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - - my ($code, $nmatch, $sjis, $euc, $utf8) = ("", 0, 0, 0, 0); - if ($$r_str =~ /$RE{BIN}/o) { # 'binary' - my $ucs2; - $ucs2 += length($1) - while $$r_str =~ /(\x00$RE{ASCII})+/go; - if ($ucs2){ # smells like raw unicode - ($code, $nmatch) = ('ucs2', $ucs2); - }else{ - ($code, $nmatch) = ('binary', 0); - } - } - elsif ($$r_str !~ /[\e\x80-\xff]/o) { # not Japanese - ($code, $nmatch) = ('ascii', 1); - } # 'jis' - elsif ($$r_str =~ - m[ - $RE{JIS_0208}|$RE{JIS_0212}|$RE{JIS_ASC}|$RE{JIS_KANA} - ]ox) - { - ($code, $nmatch) = ('jis', 1); - } - else { # should be euc|sjis|utf8 - # use of (?:) by Hiroki Ohzaki <ohzaki@iod.ricoh.co.jp> - $sjis += length($1) - while $$r_str =~ /((?:$RE{SJIS_C})+)/go; - $euc += length($1) - while $$r_str =~ /((?:$RE{EUC_C}|$RE{EUC_KANA}|$RE{EUC_0212})+)/go; - $utf8 += length($1) - while $$r_str =~ /((?:$RE{UTF8})+)/go; - $nmatch = _max($utf8, $sjis, $euc); - carp ">DEBUG:sjis = $sjis, euc = $euc, utf8 = $utf8" if $DEBUG >= 3; - $code = - ($euc > $sjis and $euc > $utf8) ? 'euc' : - ($sjis > $euc and $sjis > $utf8) ? 'sjis' : - ($utf8 > $euc and $utf8 > $sjis) ? 'utf8' : undef; - } - return wantarray ? ($code, $nmatch) : $code; -} - -sub convert{ - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - my ($ocode, $icode, $opt) = @_; - - my $nmatch; - ($icode, $nmatch) = getcode($r_str) unless $icode; - - return $$r_str if $icode eq $ocode and !defined $opt; # do nothin' - - no strict qw(refs); - my $method; - - # convert to EUC - - load_module("Jcode::Unicode") if $icode =~ /ucs2|utf8/o; - if ($icode and defined &{$method = $icode . "_euc"}){ - carp "Dispatching \&$method" if $DEBUG >= 2; - &{$method}($r_str) ; - } - - # h2z or z2h - - if ($opt){ - my $cmd = ($opt =~ /^z/o) ? "h2z" : ($opt =~ /^h/o) ? "z2h" : undef; - if ($cmd){ - require Jcode::H2Z; - &{'Jcode::H2Z::' . $cmd}($r_str); - } - } - - # convert to $ocode - - load_module("Jcode::Unicode") if $ocode =~ /ucs2|utf8/o; - if ($ocode and defined &{$method = "euc_" . $ocode}){ - carp "Dispatching \&$method" if $DEBUG >= 2; - &{$method}($r_str) ; - } - $$r_str; -} - -# JIS<->EUC - -sub jis_euc { - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - $$r_str =~ s( - ($RE{JIS_0212}|$RE{JIS_0208}|$RE{JIS_ASC}|$RE{JIS_KANA}) - ([^\e]*) - ) - { - my ($esc, $str) = ($1, $2); - if ($esc !~ /$RE{JIS_ASC}/o) { - $str =~ tr/\x21-\x7e/\xa1-\xfe/; - if ($esc =~ /$RE{JIS_KANA}/o) { - $str =~ s/([\xa1-\xdf])/\x8e$1/og; - } - elsif ($esc =~ /$RE{JIS_0212}/o) { - $str =~ s/([\xa1-\xfe][\xa1-\xfe])/\x8f$1/og; - } - } - $str; - }geox; - $$r_str; -} - -# -# euc_jis -# -# Based upon the contribution of -# Kazuto Ichimura <ichimura@shimada.nuee.nagoya-u.ac.jp> -# optimized by <ohzaki@iod.ricoh.co.jp> - -sub euc_jis{ - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - $$r_str =~ s{ - ((?:$RE{EUC_C})+|(?:$RE{EUC_KANA})+|(?:$RE{EUC_0212})+) - }{ - my $str = $1; - my $esc = - ( $str =~ tr/\x8E//d ) ? $ESC{KANA} : - ( $str =~ tr/\x8F//d ) ? $ESC{JIS_0212} : - $ESC{JIS_0208}; - $str =~ tr/\xA1-\xFE/\x21-\x7E/; - $esc . $str . $ESC{ASC}; - }geox; - $$r_str =~ - s/\Q$ESC{ASC}\E - (\Q$ESC{KANA}\E|\Q$ESC{JIS_0212}\E|\Q$ESC{JIS_0208}\E)/$1/gox; - $$r_str; -} - -# EUC<->SJIS - -my %_S2E = (); -my %_E2S = (); - -sub sjis_euc { - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - $$r_str =~ s( - ($RE{SJIS_C}|$RE{SJIS_KANA}) - ) - { - my $str = $1; - unless ($_S2E{$1}){ - my ($c1, $c2) = unpack('CC', $str); - if (0xa1 <= $c1 && $c1 <= 0xdf) { - $c2 = $c1; - $c1 = 0x8e; - } elsif (0x9f <= $c2) { - $c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe0 : 0x60); - $c2 += 2; - } else { - $c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe1 : 0x61); - $c2 += 0x60 + ($c2 < 0x7f); - } - $_S2E{$str} = pack('CC', $c1, $c2); - } - $_S2E{$str}; - }geox; - $$r_str; -} - -# - -sub euc_sjis { - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - $$r_str =~ s( - ($RE{EUC_C}|$RE{EUC_KANA}|$RE{EUC_0212}) - ) - { - my $str = $1; - unless ($_E2S{$str}){ - my ($c1, $c2) = unpack('CC', $str); - if ($c1 == 0x8e) { # SS2 - $_E2S{$str} = chr($c2); - } elsif ($c1 == 0x8f) { # SS3 - $_E2S{$str} = $CHARCODE{UNDEF_SJIS}; - }else { #SS1 or X0208 - if ($c1 % 2) { - $c1 = ($c1>>1) + ($c1 < 0xdf ? 0x31 : 0x71); - $c2 -= 0x60 + ($c2 < 0xe0); - } else { - $c1 = ($c1>>1) + ($c1 < 0xdf ? 0x30 : 0x70); - $c2 -= 2; - } - $_E2S{$str} = pack('CC', $c1, $c2); - } - } - $_E2S{$str}; - }geox; - $$r_str; -} - -# -# Util. Functions -# - -sub _max { - my $result = shift; - for my $n (@_){ - $result = $n if $n > $result; - } - return $result; -} - -1; - -__END__ - =head1 BUGS -Unicode support by Jcode is far from efficient! - -=head1 IN FUTURE - -Hopefully Jcode will be superceded by Encode module that is part of -the standard module on Perl 5.7 and up +For perl is 5.8.1 or later, Jcode acts as a wrapper to L<Encode>. +Meaning Jcode is subject to bugs therein. =head1 ACKNOWLEDGEMENTS @@ -804,22 +886,23 @@ for Perl4 by Kazumasa Utashiro <utashiro@iij.ad.jp>. Hiroki Ohzaki <ohzaki@iod.ricoh.co.jp> has helped me polish regexp from the very first stage of development. +JEncode by makamaka@donzoko.net has inspired me to integrate Encode to +Jcode. He has also contributed Japanese POD. + And folks at Jcode Mailing list <jcode5@ring.gr.jp>. Without them, I couldn't have coded this far. =head1 SEE ALSO -L<Jcode::Unicode> - -L<Jcode::Unicode::NoXS> +L<Encode> -http://www.iana.org/assignments/character-sets +L<Jcode::Nihongo> -L<Encode> +L<http://www.iana.org/assignments/character-sets> =head1 COPYRIGHT -Copyright 1999 Dan Kogai <dankogai@dan.co.jp> +Copyright 1999-2005 Dan Kogai <dankogai@dan.co.jp> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/dist/Jcode/Jcode/Constants.pm b/cpan/dist/Jcode/Jcode/Constants.pm index 923890d3..f83f7e0d 100644 --- a/cpan/dist/Jcode/Jcode/Constants.pm +++ b/cpan/dist/Jcode/Jcode/Constants.pm @@ -1,27 +1,24 @@ # -# $Id: Constants.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $ +# $Id: Constants.pm,v 2.0 2005/05/16 19:07:56 dankogai Exp $ # package Jcode::Constants; -use strict; use vars qw($RCSID $VERSION); -$RCSID = q$Id: Constants.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: Constants.pm,v 2.0 2005/05/16 19:07:56 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; -BEGIN { - use Exporter; - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); - @ISA = qw(Exporter); - @EXPORT = qw(); - @EXPORT_OK = qw(%CHARCODE %ESC %RE); - %EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, @EXPORT ] ); -} +use Exporter; +use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); +@ISA = qw(Exporter); +@EXPORT = qw(); +@EXPORT_OK = qw(%CHARCODE %ESC %RE); +%EXPORT_TAGS = ( 'all' => [ @EXPORT_OK, @EXPORT ] ); -use vars @EXPORT_OK; +use vars qw(%CHARCODE %ESC %RE); my %_0208 = ( 1978 => '\e\$\@', diff --git a/cpan/dist/Jcode/Jcode/H2Z.pm b/cpan/dist/Jcode/Jcode/H2Z.pm index c5706c76..e9102db4 100644 --- a/cpan/dist/Jcode/Jcode/H2Z.pm +++ b/cpan/dist/Jcode/Jcode/H2Z.pm @@ -1,5 +1,5 @@ # -# $Id: H2Z.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $ +# $Id: H2Z.pm,v 2.0 2005/05/16 19:07:57 dankogai Exp $ # package Jcode::H2Z; @@ -7,8 +7,8 @@ package Jcode::H2Z; use strict; use vars qw($RCSID $VERSION); -$RCSID = q$Id: H2Z.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 0.77 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: H2Z.pm,v 2.0 2005/05/16 19:07:57 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; diff --git a/cpan/dist/Jcode/Jcode/Tr.pm b/cpan/dist/Jcode/Jcode/Tr.pm index 9f226267..dfb0d4e4 100644 --- a/cpan/dist/Jcode/Jcode/Tr.pm +++ b/cpan/dist/Jcode/Jcode/Tr.pm @@ -1,5 +1,5 @@ # -# $Id: Tr.pm,v 0.78 2002/05/03 00:20:16 dankogai Exp $ +# $Id: Tr.pm,v 2.0 2005/05/16 19:08:00 dankogai Exp $ # package Jcode::Tr; @@ -7,13 +7,12 @@ package Jcode::Tr; use strict; use vars qw($VERSION $RCSID); -$RCSID = q$Id: Tr.pm,v 0.78 2002/05/03 00:20:16 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 0.78 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: Tr.pm,v 2.0 2005/05/16 19:08:00 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; use Jcode::Constants qw(:all); -use vars qw(%_TABLE); sub tr { # $prev_from, $prev_to, %table are persistent variables @@ -21,8 +20,8 @@ sub tr { my (@from, @to); my $n = 0; - undef %_TABLE; - &_maketable($from, $to, $opt); + my %_TABLE; + _maketable($from, $to, $opt, \%_TABLE); $$r_str =~ s( ([\x80-\xff][\x00-\xff]|[\x00-\xff]) @@ -34,7 +33,7 @@ sub tr { } sub _maketable{ - my( $from, $to, $opt ) = @_; + my( $from, $to, $opt, $tbl ) = @_; $opt ||= ''; $from =~ s/($RE{EUC_0212}-$RE{EUC_0212})/&_expnd3($1)/geo; $from =~ s/($RE{EUC_KANA}-$RE{EUC_KANA})/&_expnd2($1)/geo; @@ -49,7 +48,7 @@ sub _maketable{ my @to = $to =~ /$RE{EUC_0212}|$RE{EUC_KANA}|$RE{EUC_C}|[\x00-\xff]/go; push @to, ($opt =~ /d/ ? '' : $to[-1]) x ($#from - $#to) if $#to < $#from; - @_TABLE{@from} = @to; + @$tbl{@from} = @to; } diff --git a/cpan/dist/Jcode/Jcode/Unicode/Constants.pm b/cpan/dist/Jcode/Jcode/Unicode/Constants.pm index 8444611b..2069bf35 100644 --- a/cpan/dist/Jcode/Jcode/Unicode/Constants.pm +++ b/cpan/dist/Jcode/Jcode/Unicode/Constants.pm @@ -1,5 +1,5 @@ # -# $Id: Constants.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $ +# $Id: Constants.pm,v 2.0 2005/05/16 19:08:01 dankogai Exp $ # package Jcode::Unicode::Constants; @@ -38,8 +38,8 @@ Copyright (c) 1991-1994 Unicode, Inc. use strict; use vars qw($RCSID $VERSION); -$RCSID = q$Id: Constants.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: Constants.pm,v 2.0 2005/05/16 19:08:01 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; diff --git a/cpan/dist/Jcode/Jcode/Unicode/NoXS.pm b/cpan/dist/Jcode/Jcode/Unicode/NoXS.pm index ba738989..4dd0db45 100644 --- a/cpan/dist/Jcode/Jcode/Unicode/NoXS.pm +++ b/cpan/dist/Jcode/Jcode/Unicode/NoXS.pm @@ -1,5 +1,5 @@ # -# $Id: NoXS.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $ +# $Id: NoXS.pm,v 2.0 2005/05/16 19:08:02 dankogai Exp $ # package Jcode::Unicode::NoXS; @@ -7,8 +7,8 @@ package Jcode::Unicode::NoXS; use strict; use vars qw($RCSID $VERSION); -$RCSID = q$Id: NoXS.pm,v 0.77 2002/01/14 11:06:55 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 0.77 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: NoXS.pm,v 2.0 2005/05/16 19:08:02 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; diff --git a/cpan/dist/Jcode/MANIFEST b/cpan/dist/Jcode/MANIFEST index 1b390469..b3012399 100644 --- a/cpan/dist/Jcode/MANIFEST +++ b/cpan/dist/Jcode/MANIFEST @@ -1,35 +1,49 @@ Changes -INSTALL +Changes.ver0X Jcode.pm Jcode/Constants.pm Jcode/H2Z.pm +Jcode/Nihongo.pod Jcode/Tr.pm Jcode/Unicode/Constants.pm Jcode/Unicode/NoXS.pm +Jcode/_Classic.pm MANIFEST +META.yml Module meta-data (added by MakeMaker) Makefile.PL README Unicode/Makefile.PL Unicode/Unicode.pm Unicode/Unicode.xs -Unicode/_test.pl -Unicode/table.h +Unicode/euc2uni.h Unicode/uni.c -mac_install.pl +Unicode/uni2euc.h +t/_test_unicode.pl t/ambiguous.pl +t/append.t t/benchmark.pl t/convert.t +t/fun.pl t/getcode.t t/h2z.t t/hankaku.euc t/hiragana.euc +t/jfold.t t/length.t t/mime.t t/new.t +t/perl581.t +t/regex.t t/stripped.euc t/table.euc +t/table.jis +t/table.sjis +t/table.ucs2 +t/table.utf8 t/tr.t t/unibench.pl t/x0212.euc +t/x0212.jis +t/x0212.ucs2 +t/x0212.utf8 t/zenkaku.euc -win_install.pl diff --git a/cpan/dist/Jcode/Makefile.PL b/cpan/dist/Jcode/Makefile.PL index ba41c42b..a51dfba3 100644 --- a/cpan/dist/Jcode/Makefile.PL +++ b/cpan/dist/Jcode/Makefile.PL @@ -1,10 +1,21 @@ #!/usr/local/bin/perl # -# $Id: Makefile.PL,v 0.77 2002/01/14 11:06:55 dankogai Exp $ +# $Id: Makefile.PL,v 2.1 2005/06/20 06:21:06 dankogai Exp $ # - +use strict; use ExtUtils::MakeMaker; +my @EXTRA; +if ($] >= 5.008001){ + @EXTRA = ( + NORECURS => 1, + PM => { 'Jcode.pm' => '$(INST_LIB)/Jcode.pm', + 'Jcode/Nihongo.pod' + => '$(INST_LIB)/Jcode/Nihongo.pod' + }, + ); +} + WriteMakefile ( NAME => 'Jcode', @@ -16,5 +27,6 @@ WriteMakefile (ABSTRACT_FROM => 'Jcode.pm', # retrieve abstract from module AUTHOR => 'Dan Kogai <dankogai@dan.co.jp>') : () ), + @EXTRA, ); diff --git a/cpan/dist/Jcode/README b/cpan/dist/Jcode/README index 48b993f1..13602b6e 100644 --- a/cpan/dist/Jcode/README +++ b/cpan/dist/Jcode/README @@ -1,20 +1,32 @@ # -# $Id: README,v 0.77 2002/01/14 11:06:55 dankogai Exp $ +# $Id: README,v 2.0 2005/05/16 19:08:09 dankogai Exp $ # -Jcode: ------- +Jcode -This is a Perl extension interface to convert Japanese text. + This is a Perl extension interface to convert Japanese text. -To build the extensions, unpack this distribution somewhere, create -the Makefile by running 'perl Makefile.PL' and do a 'make', 'make -test', and if successful 'make install'. +Requirements -You will need perl version 5.004 or better to install these modules. -Further documentation is embedded in the individual modules. + You need perl version 5.005 or better. + MIME header support requires MIME::Base64 module. + Some extended features require perl 5.8.1 or better -Copyright 1999 Dan Kogai. +Install -This library is free software; you can redistribute it -and/or modify it under the same terms as Perl itself. + Do the following via shell. + + perl Makefile.PL + make + make test + make install + + If your perl is 5.8.1 or better, you can simply copy Jcode.pm to + anywhere you want, a la jcode.pl. + +COPYRIGHT + + Copyright 1999-2005 Dan Kogai <dankogai@dan.co.jp> + + This library is free software; you can redistribute it and/or modify it + under the same terms as Perl itself. diff --git a/cpan/dist/Jcode/Unicode/Unicode.pm b/cpan/dist/Jcode/Unicode/Unicode.pm index 34d15ea2..b39105e6 100644 --- a/cpan/dist/Jcode/Unicode/Unicode.pm +++ b/cpan/dist/Jcode/Unicode/Unicode.pm @@ -1,5 +1,5 @@ # -# $Id: Unicode.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $ +# $Id: Unicode.pm,v 2.0 2005/05/16 19:08:12 dankogai Exp $ # package Jcode::Unicode; @@ -7,8 +7,8 @@ package Jcode::Unicode; use strict; use vars qw($RCSID $VERSION @ISA @EXPORT $PEDANTIC); -$RCSID = q$Id: Unicode.pm,v 1.2 2001/05/18 05:14:38 dankogai Exp $; -$VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$RCSID = q$Id: Unicode.pm,v 2.0 2005/05/16 19:08:12 dankogai Exp $; +$VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Carp; require Exporter; @@ -22,47 +22,46 @@ bootstrap Jcode::Unicode $VERSION; # Merge these subs to Jcode -sub Jcode::ucs2_euc{ - my ($thingy, $pedantic) = @_; $pedantic ||= 0; +sub Jcode::_Classic::ucs2_euc{ + my ($thingy) = @_; my $r_str = ref $thingy ? $thingy : \$thingy; return - $$r_str = Jcode::Unicode::ucs2_euc($$r_str, $pedantic); + $$r_str = Jcode::Unicode::ucs2_euc($$r_str); } -sub Jcode::euc_ucs2{ - my ($thingy, $pedantic) = @_; $pedantic ||= 0; +sub Jcode::_Classic::euc_ucs2{ + my ($thingy) = @_; my $r_str = ref $thingy ? $thingy : \$thingy; return - $$r_str = Jcode::Unicode::euc_ucs2($$r_str, $pedantic); + $$r_str = Jcode::Unicode::euc_ucs2($$r_str); } -sub Jcode::ucs2_utf8{ - my ($thingy, $pedantic) = @_; +sub Jcode::_Classic::ucs2_utf8{ + my ($thingy) = @_; my $r_str = ref $thingy ? $thingy : \$thingy; return $$r_str = Jcode::Unicode::ucs2_utf8($$r_str); } -sub Jcode::utf8_ucs2{ +sub Jcode::_Classic::utf8_ucs2{ my ($thingy) = @_; my $r_str = ref $thingy ? $thingy : \$thingy; return $$r_str = Jcode::Unicode::utf8_ucs2($$r_str); } - -sub Jcode::euc_utf8{ - my $thingy = shift; +sub Jcode::_Classic::euc_utf8{ + my ($thingy) = @_; my $r_str = ref $thingy ? $thingy : \$thingy; - &Jcode::euc_ucs2($r_str); - &Jcode::ucs2_utf8($r_str); + return + $$r_str = Jcode::Unicode::euc_utf8($$r_str); } -sub Jcode::utf8_euc{ - my $thingy = shift; - my $r_str = ref $thingy ? $thingy : \$thingy; - &Jcode::utf8_ucs2($r_str); - &Jcode::ucs2_euc($r_str); +sub Jcode::_Classic::utf8_euc{ + my ($thingy) = @_; + my $r_str = ref $thingy ? $thingy : \$thingy; + return + $$r_str = Jcode::Unicode::utf8_euc($$r_str); } 1; @@ -108,12 +107,18 @@ Following functions are defined here; =item B<$Jcode::Unicode::PEDANTIC> +Now obsolete and abolished. It used to mean.. + When set to non-zero, x-to-unicode conversion becomes pedantic. That is, '\' (chr(0x5c)) is converted to zenkaku backslash and '~" (chr(0x7e)) to JIS-x0212 tilde. By Default, Jcode::Unicode leaves ascii ([0x00-0x7f]) as it is. +But as of perl 5.8. It has been standarlized (in perl community) +that we leave ascii as it is so Jcode no longer has to support +this option. + =back =cut @@ -124,11 +129,12 @@ If any, that is Unicode, Inc. to Blame (Especially JIS0201.TXT). =head1 SEE ALSO -http://www.unicode.org/ +L<http://www.unicode.org/> +L<http://www.debian.or.jp/~kubota/unicode-symbols.html.en> =head1 COPYRIGHT -Copyright 1999 Dan Kogai <dankogai@dan.co.jp> +Copyright 1999-2003 Dan Kogai <dankogai@dan.co.jp> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/dist/Jcode/Unicode/Unicode.xs b/cpan/dist/Jcode/Unicode/Unicode.xs index 7ed3fda1..403fa2ff 100644 --- a/cpan/dist/Jcode/Unicode/Unicode.xs +++ b/cpan/dist/Jcode/Unicode/Unicode.xs @@ -18,41 +18,37 @@ MODULE = Jcode::Unicode PACKAGE = Jcode::Unicode PROTOTYPES: ENABLE char * -euc_ucs2(src, ...) +euc_ucs2(src) SV * src PROTOTYPE: $;$ CODE: STRLEN srclen; STRLEN dstlen; char *s = SvROK(src) ? SvPV(SvRV(src), srclen) :SvPV(src, srclen); - int pedantic = 0; - if (items > 1) { pedantic = SvIV(ST(1)); }; dstlen = srclen * 3 + 10; /* large enough? */ ST(0) = sv_2mortal(newSV(dstlen)); - dstlen = _euc_ucs2((unsigned char *)SvPVX(ST(0)), (unsigned char *)s, pedantic); + dstlen = _euc_ucs2((unsigned char *)SvPVX(ST(0)), (unsigned char *)s); SvCUR_set(ST(0), dstlen); SvPOK_only(ST(0)); if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } char * -ucs2_euc(src, ...) +ucs2_euc(src) SV * src PROTOTYPE: $;$ CODE: STRLEN srclen; STRLEN dstlen; char *s = SvROK(src) ? SvPV(SvRV(src), srclen) :SvPV(src, srclen); - int pedantic = 0; - if (items > 1) { pedantic = SvIV(ST(1)); }; dstlen = srclen * 3 + 10; /* large enough? */ ST(0) = sv_2mortal(newSV(dstlen)); - dstlen = _ucs2_euc((unsigned char *)SvPVX(ST(0)), (unsigned char *)s, srclen, pedantic); + dstlen = _ucs2_euc((unsigned char *)SvPVX(ST(0)), (unsigned char *)s, srclen); SvCUR_set(ST(0), dstlen); SvPOK_only(ST(0)); if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } char * -utf8_ucs2(src, ...) +utf8_ucs2(src) SV * src PROTOTYPE: $ CODE: @@ -67,7 +63,7 @@ utf8_ucs2(src, ...) if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } char * -ucs2_utf8(src, ...) +ucs2_utf8(src) SV * src PROTOTYPE: $ CODE: @@ -81,6 +77,36 @@ ucs2_utf8(src, ...) SvPOK_only(ST(0)); if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } +char * +utf8_euc(src) + SV * src + PROTOTYPE: $ + CODE: + STRLEN srclen; + STRLEN dstlen; + char *s = SvROK(src) ? SvPV(SvRV(src), srclen) :SvPV(src, srclen); + dstlen = srclen * 3 + 10; /* large enough? */ + ST(0) = sv_2mortal(newSV(dstlen)); + dstlen = _utf8_euc((unsigned char *)SvPVX(ST(0)), (unsigned char *)s); + SvCUR_set(ST(0), dstlen); + SvPOK_only(ST(0)); + if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } + +char * +euc_utf8(src) + SV * src + PROTOTYPE: $ + CODE: + STRLEN srclen; + STRLEN dstlen; + char *s = SvROK(src) ? SvPV(SvRV(src), srclen) :SvPV(src, srclen); + dstlen = srclen * 3 + 10; /* large enough? */ + ST(0) = sv_2mortal(newSV(dstlen)); + dstlen = _euc_utf8((unsigned char *)SvPVX(ST(0)), (unsigned char *)s); + SvCUR_set(ST(0), dstlen); + SvPOK_only(ST(0)); + if (SvROK(src)) { sv_setsv(SvRV(src), ST(0)); } + diff --git a/cpan/dist/Jcode/Unicode/uni.c b/cpan/dist/Jcode/Unicode/uni.c index b6e47858..e19c999c 100644 --- a/cpan/dist/Jcode/Unicode/uni.c +++ b/cpan/dist/Jcode/Unicode/uni.c @@ -1,244 +1,256 @@ /* - * $Id: uni.c,v 0.79 2002/01/16 02:18:49 dankogai Exp $ - * (c) 1999 Dan Kogai <dankogai@dan.co.jp> + * $Id: uni.c,v 2.0 2005/05/16 19:08:16 dankogai Exp $ + * (c) 1999-2003 Dan Kogai <dankogai@dan.co.jp> + * This library is free software; you can redistribute it and/or + * modify it under the same terms as Perl itself. */ + #include <stdio.h> #include <string.h> -#include <stdlib.h> -#include <limits.h> -/* -isascii() is no longer used to keep compatible w/ jperl - -- thanks, Hirofumi.Watanabe@jp.sony.com -#include <ctype.h> -*/ -#define IS_ASCII(c) ((unsigned)(c) <= 0x7F) - -#include "table.h" -#include <sys/errno.h> - -#define not_iso646_jp(x) ((x) != '\\' && (x) != '~') - -Octet *q2o(Quad q){ - static Octet buf[8]; - Octet *bufp; - buf[8] = '\0'; - for(bufp = &(buf[7]); q != 0; q >>= 8, bufp--){ - *bufp = q % 256; - } - return ++bufp; -} - -Quad o2q(Octet *o, int nchar){ - Quad result = 0; - do{ - result <<= 8; - result += *o++; - }while(--nchar > 0); - return result; -} -/*-- UCS2 -> EUC --*/ +#include "uni2euc.h" +#include "euc2uni.h" -int u_match(const void *key, const void *member){ - Quad x = *((Quad *)key); - Quad y = ((Table_t *)member)->ucs2; - int result = (x > y) ? 1 : (x < y) ? -1 : 0; - return result; -} +#ifndef U8 +#define U8 unsigned char +#endif +#ifndef U16 +#define U16 unsigned short +#endif +#ifndef U32 +#define U32 unsigned long +#endif -Octet *u2e(Quad *qp, int pedantic){ - Table_t *t; - static Octet buf[4]; - if (IS_ASCII(*qp)){ - if (!pedantic || not_iso646_jp(*qp)){ - return q2o(*qp); +U32 _ucs2_euc(U8 *dst, U8 *src, U32 nchar){ + U32 result = 0; + U32 len; + char *offset; + for (nchar /= 2; nchar > 0; nchar--, src += 2){ + offset = uni2euc[src[0]] + src[1]*4; + strncpy((char *)dst, offset, 4); + len = strlen(offset); + dst += len; + result += len; } - } - t = (Table_t *)bsearch(qp, U2E, TABLE_SIZE, sizeof(Table_t), u_match); - if (t != NULL){ - return q2o(t->euc); - }else{ - return (unsigned char *)"\xa2\xae"; /* */ - } + return result; } -size_t _ucs2_euc(Octet *dst, Octet *src, int nchar, int pedantic){ - Quad q; - Octet ebuf[8]; - Octet *o_dst = dst; - size_t result = 0; - - for (nchar /= 2; nchar > 0; nchar--, src += 2) - { - q = o2q(src, 2); - strcpy((char *)ebuf, (char *)u2e(&q, pedantic)); - strcpy((char *)dst, (char *)ebuf); - dst += strlen((char *)ebuf); - result += strlen((char *)ebuf); +# define FB_UNI 0xFFFd +# define CHKUTEN(x) (0 <= (x) && (x) < 94*94) + +U32 _euc_ucs2(U8 *dst, U8 *src){ + U32 result = 0; + U32 kuten; + U16 ucs2; + for (result = 0; *src != '\0'; src++, dst += 2, result += 2){ + if (*src <= 0x7F){ /* ASCII */ + ucs2 = src[0]; + }else if (*src == 0x8e){ /* jisx0201 */ + if (src[1]){ + ucs2 = j01_uni[src[1]]; + src += 1; + }else{ + ucs2 = FB_UNI; + } + }else if (*src == 0x8f){ /* jisx0212 */ + if (src[1] && src[2]){ + kuten = (src[1] - 0xa1)*94 + (src[2] - 0xa1); + ucs2 = CHKUTEN(kuten) ? j12_uni[kuten] : FB_UNI; + src += 2; + }else{ + ucs2 = FB_UNI; + if (src[1]) + src++; + } + }else{ /* jisx0208 */ + if (src[1]){ + kuten = (src[0] - 0xa1)*94 + (src[1] - 0xa1); + ucs2 = CHKUTEN(kuten) ? j08_uni[kuten] : FB_UNI; + src += 1; + }else{ + ucs2 = FB_UNI; + } + } + dst[0] = ucs2/256; dst[1] = ucs2%256; } - return result; + return result; } -/*-- EUC -> UCS2 --*/ - -int e_cmp(const void *a, const void *b){ - Quad x = ((Table_t *)a)->euc; - Quad y = ((Table_t *)b)->euc; - int result = (x > y) ? 1 : (x < y) ? -1 : 0; - return result; -} - -int e_match(const void *key, const void *member){ - Quad x = *((Quad *)key); - Quad y = ((Table_t *)member)->euc; - int result = (x > y) ? 1 : (x < y) ? -1 : 0; - return result; -} - -Octet *e2u(Quad *qp, int pedantic){ - Table_t *t; - static Octet buf[4]; - if (IS_ASCII(*qp)){ - if (!pedantic || not_iso646_jp(*qp)){ - sprintf((char *)buf, "%c%c", '\0', *qp); - return buf; +U32 _ucs2_utf8(U8 *dst, U8 *src, U32 nchar){ + U32 ucs2; + U32 result = 0; + for (nchar /= 2; nchar > 0; nchar--, src += 2) { + ucs2 = src[0]*256 + src[1]; + if (ucs2 < 0x80){ /* 1 byte */ + *dst++ = ucs2; + result += 1; + }else if (ucs2 < 0x800){ /* 2 bytes */ + *dst++ = (0xC0 | (ucs2 >> 6)); + *dst++ = (0x80 | (ucs2 & 0x3F)); + result += 2; + }else{ /* 3 bytes */ + *dst++ = (0xE0 | (ucs2 >> 12)); + *dst++ = (0x80 | ((ucs2 >> 6) & 0x3F)); + *dst++ = (0x80 | (ucs2 & 0x3F)); + result += 3; + } } - } - t = (Table_t *)bsearch(qp, E2U, TABLE_SIZE, sizeof(Table_t), e_match); - if (t != NULL){ - sprintf((char *)buf, "%c%c", - ((t->ucs2 & 0xff00) >> 8), (t->ucs2 & 0xff)); - return buf; - }else{ - return (unsigned char *)"\x30\x13"; /* */ - } -} - -static int INITED = 0; - -void init(void){ - int i; - if (!INITED){ - memcpy(E2U, U2E, sizeof(U2E)); - qsort(E2U, TABLE_SIZE, sizeof(Table_t), e_cmp); - INITED = 1; - } + *dst = '\0'; + return result; } -size_t _euc_ucs2(Octet *dst, Octet *src, int pedantic){ - Quad q; - size_t nchar; +U32 _utf8_ucs2(U8 *dst, U8 *src){ + U32 ucs2; + U8 c1, c2, c3; + U32 result = 0; - init(); - - for (nchar = 0; - *src != '\0'; - src++, dst += 2, nchar++) - { - if (IS_ASCII(*src)){ - q = o2q(src, 1); - } - else if(*src != 0x8f){ - q = o2q(src, 2); src += 1; - }else{ - q = o2q(src, 3); src += 2; - } - memcpy(dst, e2u(&q, pedantic), 2); + for(; *src != '\0'; src++, result++){ + if (*src < 0x80) { /* 1 byte */ + ucs2 = *src; + }else if (*src < 0xE0){ /* 2 bytes */ + if (src[1]){ + c1 = *src++; c2 = *src; + ucs2 = ((c1 & 0x1F) << 6) | (c2 & 0x3F); + }else{ + ucs2 = FB_UNI; + } + }else{ /* 3 bytes */ + if (src[1] && src[2]){ + c1 = *src++; c2 = *src++; c3 = *src; + ucs2 = ((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6)| (c3 & 0x3F); + }else{ + ucs2 = FB_UNI; + if (src[1]) + src++; + } + } + *dst++ = (ucs2 & 0xff00) >> 8; /* 1st byte */ + *dst++ = (ucs2 & 0xff); /* 2nd byte */; } - return nchar * 2; + return result * 2; } -/*-- UCS2 -> UTF8 --*/ - -size_t _ucs2_utf8(Octet *dst, Octet *src, int nchar){ - Quad ucs2; - Octet ebuf[8]; - Octet *o_dst = dst; - size_t result = 0; - - for (nchar /= 2; nchar > 0; nchar--, src += 2) - { - ucs2 = o2q(src, 2); - if (ucs2 < 0x80){ /* 1 byte */ - sprintf((char *)ebuf, "%c", ucs2); - } - else if(ucs2 < 0x800){ /* 2 bytes */ - sprintf((char *)ebuf, "%c%c", - (0xC0 | (ucs2 >> 6)), - (0x80 | (ucs2 & 0x3F)) - ); - }else{ /* 3 bytes */ - sprintf((char *)ebuf, "%c%c%c", - (0xE0 | (ucs2 >> 12)), - (0x80 | ((ucs2 >> 6) & 0x3F)), - (0x80 | (ucs2 & 0x3F)) - ); - } - strcpy((char *)dst, (char *)ebuf); - dst += strlen((char *)ebuf); - result += strlen((char *)ebuf); +U32 _euc_utf8(U8 *dst, U8 *src){ + U32 result = 0; + U32 kuten; + U16 ucs2; + for (result = 0; *src != '\0'; src++){ + if (*src <= 0x7F){ /* ASCII */ + ucs2 = src[0]; + }else if (*src == 0x8e){ /* jisx0201 */ + if (src[1]){ + ucs2 = j01_uni[src[1]]; + src += 1; + }else{ + ucs2 = FB_UNI; + } + }else if (*src == 0x8f){ /* jisx0212 */ + if (src[1] && src[2]){ + kuten = (src[1] - 0xa1)*94 + (src[2] - 0xa1); + ucs2 = CHKUTEN(kuten) ? j12_uni[kuten] : FB_UNI; + src += 2; + }else{ + ucs2 = FB_UNI; + if (src[1]) + src++; + } + }else{ /* jisx0208 */ + if (src[1]){ + kuten = (src[0] - 0xa1)*94 + (src[1] - 0xa1); + ucs2 = CHKUTEN(kuten) ? j08_uni[kuten] : FB_UNI; + src += 1; + }else{ + ucs2 = FB_UNI; + } + } + if (ucs2 < 0x80){ /* 1 byte */ + *dst++ = ucs2; + result += 1; + }else if (ucs2 < 0x800){ /* 2 bytes */ + *dst++ = (0xC0 | (ucs2 >> 6)); + *dst++ = (0x80 | (ucs2 & 0x3F)); + result += 2; + }else{ /* 3 bytes */ + *dst++ = (0xE0 | (ucs2 >> 12)); + *dst++ = (0x80 | ((ucs2 >> 6) & 0x3F)); + *dst++ = (0x80 | (ucs2 & 0x3F)); + result += 3; + } } - return result; + *dst = '\0'; + return result; } -/*-- UTF8 -> UCS2 --*/ - -size_t _utf8_ucs2(Octet *dst, Octet *src){ - Quad ucs2; - Octet c1, c2, c3; - size_t nchar = 0; - - for(; *src != '\0'; src++, nchar++){ - if (*src < 0x80) { /* 1 byte */ - ucs2 = *src; - } - else if (*src < 0xE0){ /* 2 bytes */ - c1 = *src++; c2 = *src; - ucs2 = ((c1 & 0x1F) << 6) | (c2 & 0x3F); - }else{ /* 3 bytes */ - c1 = *src++; c2 = *src++; c3 = *src; - ucs2 = ((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6)| (c3 & 0x3F); +U32 _utf8_euc(U8 *dst, U8 *src){ + U32 result = 0; + U32 len; + U16 ucs2; + U8 c1, c2, c3; + char *offset; + for(; *src != '\0'; src++){ + if (*src < 0x80) { /* 1 byte */ + ucs2 = *src; + }else if (*src < 0xE0){ /* 2 bytes */ + if (src[1]){ + c1 = *src++; c2 = *src; + ucs2 = ((c1 & 0x1F) << 6) | (c2 & 0x3F); + }else{ + ucs2 = FB_UNI; + } + }else{ /* 3 bytes */ + if (src[1] && src[2]){ + c1 = *src++; c2 = *src++; c3 = *src; + ucs2 = ((c1 & 0x0F) << 12) | ((c2 & 0x3F) << 6)| (c3 & 0x3F); + }else{ + ucs2 = FB_UNI; + if (src[1]){ + src++; + } + } + } + offset = uni2euc[ucs2/256] + (ucs2%256)*4; + strncpy((char *)dst, offset, 4); + len = strlen(offset); + dst += len; + result += len; } - *dst++ = (ucs2 & 0xff00) >> 8; /* 1st byte */ - *dst++ = (ucs2 & 0xff); /* 2nd byte */; - } - return nchar * 2; + return result; } #ifndef PERL_XS +#include <sys/errno.h> + int main(int argc, char **argv){ - Octet buf1[1024], buf2[1024]; - int nchar; - - FILE *IN; - if (argc > 1){ - IN = fopen(argv[1], "r"); - if (IN == NULL){ - fprintf(stderr, "Can't open %s; %s\n", argv[1], strerror(errno)); - exit(-1); + U8 buf1[1024], buf2[1024]; + int result; + + FILE *IN; + if (argc > 1){ + IN = fopen(argv[1], "r"); + if (IN == NULL){ + fprintf(stderr, "Can't open %s; %s\n", argv[1], strerror(errno)); + exit(-1); + } + }else{ + IN = stdin; } - }else{ - IN = stdin; - } #ifdef EUC_UTF8 - while(fgets(buf2, 256, IN)){ - nchar = _euc_ucs2(buf1, buf2, 0); - nchar = _ucs2_utf8(buf2, buf1, nchar); - fputs(buf2, stdout); - } - + while(fgets(buf2, 256, IN)){ + result = _euc_utf8(buf1, buf2); + fputs(buf1, stdout); + } + #else - - while(fgets(buf1, 256, IN)){ - nchar = _utf8_ucs2(buf2, buf1); - nchar = _ucs2_euc(buf1, buf2, nchar, 0); - fputs(buf1, stdout); - } - + + while(fgets(buf1, 256, IN)){ + result = _utf8_euc(buf2, buf1); + fputs(buf2, stdout); + } + #endif } diff --git a/cpan/dist/Jcode/t/benchmark.pl b/cpan/dist/Jcode/t/benchmark.pl index 86917abd..56a933de 100644 --- a/cpan/dist/Jcode/t/benchmark.pl +++ b/cpan/dist/Jcode/t/benchmark.pl @@ -1,35 +1,57 @@ #!/usr/local/bin/perl +use strict; +use lib 't'; +use Benchmark qw/:all/; -use Benchmark; - -my $count = $ARGV[0] || 16; +my $count = $ARGV[0] || -1; open F, "t/table.euc" or die "$!"; +our @src; +our $ocode; while(<F>){ push @src, $_; } -for $ocode (qw/euc jis sjis/){ + +our %jcode2encode = ( + jis => '7bit-jis', + euc => 'euc-jp', + sjis => 'shiftjis', + ); + +for (qw/euc jis sjis ucs2 utf8/){ + $ocode = $_; print "euc -> $ocode\n"; - timethese($count, { - "Jcode.pm (OOP) " => \&Jcode_oop, - "Jcode.pm (Trad.)" => \&Jcode_trad, - "jcode.pl " => \&jcode_test, + my $res = timethese($count, + { + "Encode.pm" => \&Encode_test, + "Jcode.pm (OOP)" => \&Jcode_oop, + "Jcode.pm (Trad.)" => \&Jcode_trad, + /^u/ ? () : ("jcode.pl" => \&jcode_test), + } + ); + cmpthese($res); +} +sub Encode_test{ + use Encode qw/from_to/; + for (@src){ + my $tmp = $_; + from_to($tmp, 'euc-jp', $jcode2encode{$ocode} || $ocode); } - ); } - sub jcode_test{ require "jcode.pl"; for (@src){ - &jcode::convert(\$_, $ocode, 'euc'); + my $tmp = $_; + &jcode::convert(\$tmp, $ocode, 'euc'); } } sub Jcode_trad{ use Jcode; for (@src){ - &Jcode::convert(\$_, $ocode, 'euc'); + my $tmp = $_; + &Jcode::convert(\$tmp, $ocode, 'euc'); } } @@ -38,7 +60,8 @@ sub Jcode_oop{ no strict "refs"; my $j = new Jcode; for (@src){ - $j->set(\$_, 'euc')->$ocode(); + my $tmp = $_; + $j->set(\$tmp, 'euc')->$ocode(); } } diff --git a/cpan/dist/Jcode/t/convert.t b/cpan/dist/Jcode/t/convert.t index 9f8efd4e..28f31684 100644 --- a/cpan/dist/Jcode/t/convert.t +++ b/cpan/dist/Jcode/t/convert.t @@ -1,121 +1,55 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use strict; -use diagnostics; -$| = 1; # autoflush -use vars qw(@ARGV $ARGV); use Jcode; - -my ($NTESTS, @TESTS) ; - -sub profile { - my $profile = shift; - print $profile if $ARGV[0]; - $profile =~ m/(not ok|ok) (\d+)$/o; - $profile = "$1 $2\n"; - $NTESTS = $2; - push @TESTS, $profile; +use Test; +BEGIN { plan tests => 83 } + +my $seq = 0; +sub myok{ # overloads Test::ok; + my ($a, $b, $comment) = @_; + print "not " if $a ne $b; + ++$seq; + print "ok $seq # $comment\n"; } - -my $n = 0; - -my $file = "t/table.euc"; -open F, $file or die "$file:$!"; -my $euc; -read F, $euc, -s $file; -profile(sprintf("prep: euc ok %d\n", ++$n)); - -my $jis = Jcode::euc_jis($euc); -profile(sprintf("prep: jis ok %d\n", ++$n)) unless $jis eq $euc; - -my $sjis = Jcode::euc_sjis($euc); -profile(sprintf("prep: sjis ok %d\n", ++$n)) unless $sjis eq $euc; - -Jcode::load_module("Jcode::Unicode"); - -my $ucs2 = Jcode::euc_ucs2($euc); -profile(sprintf("prep: ucs2 ok %d\n", ++$n)) unless $ucs2 eq $euc; - -my $utf8 = Jcode::euc_utf8($euc); -profile(sprintf("prep: utf8 ok %d\n", ++$n)) unless $utf8 eq $euc; - -my %code2str = - ( - 'euc' => $euc, - 'jis' => $jis, - 'sjis' => $sjis, - 'ucs2' => $ucs2, - 'utf8' => $utf8, - ); - - -# AUTO & REF - -my $ok; - -for my $ocode (keys %code2str){ - my $str = $euc; - &Jcode::convert(\$str, $ocode); - if ($str eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; - } - profile(sprintf("REF: auto -> %4s %s %d\n", - $ocode, $ok, ++$n )); +my %code2str; +for my $enc (qw/euc sjis jis utf8 ucs2/){ + my $file = "t/table.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; } - -# by Value - -for my $icode (keys %code2str){ - for my $ocode (keys %code2str){ - if (Jcode::convert($code2str{$icode}, $ocode, $icode) - eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; - } - profile(sprintf("ASCII|X201|X208: %4s -> %4s %s %d\n", - $icode, $ocode, $ok, ++$n )); - - } +my @code2str = keys %code2str; +check("ascii|x0208"); +%code2str = (); +for my $enc (qw/euc jis utf8 ucs2/){ + my $file = "t/x0212.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; } - -# x212 - -$file = "t/x0212.euc"; -open F, $file or die "$file:$!"; -read F, $euc, -s $file; -#profile(sprintf("prep: euc ok %d\n", ++$n)); - -$jis = Jcode::euc_jis($euc); -#$ucs2 = Jcode::euc_ucs2($euc); -#$utf8 = Jcode::euc_utf8($euc); - -%code2str = - ( - 'euc' => $euc, - 'jis' => $jis, - #'sjis' => $sjis, - #'ucs2' => $ucs2, - #'utf8' => $utf8, - ); - -for my $icode (keys %code2str){ - for my $ocode (keys %code2str){ - if (Jcode::convert($code2str{$icode}, $ocode, $icode) - eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; +@code2str = keys %code2str; +check("x0212"); + +sub check{ + my $table = shift; + for my $icode (@code2str){ + for my $ocode (@code2str){ + my $str = $code2str{$icode}; + myok(Jcode::convert($str, $ocode, $icode), $code2str{$ocode}, + "$table:\$str" . " $icode => $ocode"); + $str = $code2str{$icode}; # for sure; + Jcode::convert(\$str, $ocode, $icode); + myok($str, $code2str{$ocode}, + "$table:\\\$str" . " $icode => $ocode"); } - profile(sprintf("X0212: %4s -> %4s %s %d\n", - $icode, $ocode, $ok, ++$n )); } } -print 1, "..", $NTESTS, "\n"; -for my $TEST (@TESTS){ - print $TEST; -} +myok("This is a constant", + Jcode::convert("This is a constant", "euc", "sjis"), + qq<Jcode::convert("constant" ...)>); +__END__ diff --git a/cpan/dist/Jcode/t/getcode.t b/cpan/dist/Jcode/t/getcode.t index 7aa6f6f7..bb7603c7 100644 --- a/cpan/dist/Jcode/t/getcode.t +++ b/cpan/dist/Jcode/t/getcode.t @@ -1,69 +1,47 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use strict; -use diagnostics; -$| = 1; # autoflush -use vars qw(@ARGV $ARGV); use Jcode; - -$Jcode::DEBUG ||= $ARGV[0] ? $ARGV[0] : 0; - -my ($NTESTS, @TESTS) ; - -sub profile { - no strict 'vars'; - my $profile = shift; - print $profile if $ARGV[0]; - $profile =~ m/(not ok|ok) (\d+)$/o; - $profile = "$1 $2\n"; - $NTESTS = $2; - push @TESTS, $profile; +use Test; +BEGIN { plan tests => 9 } + +my $seq = 0; +sub myok{ # overloads Test::ok; + my ($a, $b, $comment) = @_; + print "not " if $a ne $b; + ++$seq; + print "ok $seq # $comment\n"; } - -my $n = 0; - -my $file = "t/table.euc"; -open F, $file or die "$file:$!"; -my $euc; -read F, $euc, -s $file; -profile(sprintf("prep: euc ok %d\n", ++$n)); - -my $jis = Jcode::euc_jis($euc); -profile(sprintf("prep: jis ok %d\n", ++$n)) unless $jis eq $euc; - -my $sjis = Jcode::euc_sjis($euc); -profile(sprintf("prep: sjis ok %d\n", ++$n)) unless $sjis eq $euc; - -Jcode::load_module("Jcode::Unicode"); - -my $ucs2 = Jcode::euc_ucs2($euc); -profile(sprintf("prep: ucs2 ok %d\n", ++$n)) unless $ucs2 eq $euc; - -my $utf8 = Jcode::euc_utf8($euc); -profile(sprintf("prep: utf8 ok %d\n", ++$n)) unless $utf8 eq $euc; - -profile(sprintf("getcode: euc ok %d\n", ++$n)) - unless Jcode::getcode($euc) ne 'euc'; -profile(sprintf("getcode: jis ok %d\n", ++$n)) - unless Jcode::getcode($jis) ne 'jis'; -profile(sprintf("getcode: sjis ok %d\n", ++$n)) - unless Jcode::getcode($sjis) ne 'sjis'; -profile(sprintf("getcode: ucs2 ok %d\n", ++$n)) - unless Jcode::getcode($ucs2) ne 'ucs2'; -profile(sprintf("getcode: utf8 ok %d\n", ++$n)) - unless Jcode::getcode($utf8) ne 'utf8'; - -print 1, "..", $NTESTS, "\n"; -for my $TEST (@TESTS){ - print $TEST; +my %code2str; +for my $enc (qw/euc sjis jis utf8 ucs2/){ + my $file = "t/table.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; +} +my @code2str = keys %code2str; +check("ascii|x0208"); +%code2str = (); +for my $enc (qw/euc jis utf8 ucs2/){ + my $file = "t/x0212.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; +} +@code2str = keys %code2str; +check("x0212"); + +sub check{ + my $table = shift; + for my $icode (@code2str){ + my $str = $code2str{$icode}; + my $code = getcode(\$str); + myok($icode, $code, + "$table:getcode(\$str, $icode) -> $code"); + } } - - - - - - - - +__END__ diff --git a/cpan/dist/Jcode/t/h2z.t b/cpan/dist/Jcode/t/h2z.t index df0d6f6b..ad444ed5 100644 --- a/cpan/dist/Jcode/t/h2z.t +++ b/cpan/dist/Jcode/t/h2z.t @@ -1,34 +1,25 @@ #!/usr/bin/perl -w use strict; -use diagnostics; -$| = 1; # autoflush -use vars qw(@ARGV $ARGV); use Jcode; - -my ($NTESTS, @TESTS) ; - -sub profile { - no strict 'vars'; - my $profile = shift; - print $profile if $ARGV[0]; - $profile =~ m/(not ok|ok) (\d+)$/o; - $profile = "$1 $2\n"; - $NTESTS = $2; - push @TESTS, $profile; +use Test; +BEGIN { plan tests => 4 } + +my $seq = 0; +sub myok{ # overloads Test::ok; + my ($a, $b, $comment) = @_; + print "not " if $a ne $b; + ++$seq; + print "ok $seq # $comment\n"; } - -my $n = 0; my $file; my $hankaku; $file = "t/hankaku.euc"; open F, $file or die "$file:$!"; read F, $hankaku, -s $file; -profile(sprintf("prep: hankaku ok %d\n", ++$n)); my $zenkaku; $file = "t/zenkaku.euc"; open F, $file or die "$file:$!"; read F, $zenkaku, -s $file; -profile(sprintf("prep: zenkaku ok %d\n", ++$n)); my %code2str = ( @@ -43,22 +34,11 @@ for my $icode (keys %code2str){ my $ok; my $str = $code2str{$icode}; my $out = jcode(\$str)->$ocode()->euc; - if ($out eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; - print $out; - } - profile(sprintf("H2Z: %s -> %s %s %d\n", - $icode, $ocode, $ok, ++$n )); + myok($out, $code2str{$ocode}, + "H2Z: $icode -> $ocode"); } } - -print 1, "..", $NTESTS, "\n"; -for my $TEST (@TESTS){ - print $TEST; -} - +__END__ diff --git a/cpan/dist/Jcode/t/mime.t b/cpan/dist/Jcode/t/mime.t index f00931b3..b4dc92de 100644 --- a/cpan/dist/Jcode/t/mime.t +++ b/cpan/dist/Jcode/t/mime.t @@ -75,8 +75,8 @@ EOF }else{ $ok = "not ok"; print <<"EOF"; -D:>$decoded< -D:>$t_decoded< +Di:>$decoded< +Do:>$t_decoded< EOF } profile(sprintf("MIME decode: %s -> %s %s %d\n", @@ -87,8 +87,8 @@ EOF }else{ $ok = "not ok"; print <<"EOF"; -E>$encoded< -E>$t_encoded< +Ei>$encoded< +Eo>$t_encoded< EOF } profile(sprintf("MIME encode: %s -> %s %s %d\n", diff --git a/cpan/dist/Jcode/t/new.t b/cpan/dist/Jcode/t/new.t index ac2bc43c..c11b63d7 100644 --- a/cpan/dist/Jcode/t/new.t +++ b/cpan/dist/Jcode/t/new.t @@ -1,114 +1,50 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl use strict; -use diagnostics; -$| = 1; # autoflush -use vars qw(@ARGV $ARGV); use Jcode; - -my ($NTESTS, @TESTS) ; - -sub profile { - no strict 'vars'; - my $profile = shift; - print $profile if $ARGV[0]; - $profile =~ m/(not ok|ok) (\d+)$/o; - $profile = "$1 $2\n"; - $NTESTS = $2; - push @TESTS, $profile; +use Test; +BEGIN { plan tests => 41 } + +my $seq = 0; +sub myok{ # overloads Test::ok; + my ($a, $b, $comment) = @_; + print "not " if $a ne $b; + ++$seq; + print "ok $seq # $comment\n"; } - -my $n = 0; -my $file = "t/table.euc"; -open F, $file or die "$file:$!"; -my $euc; -read F, $euc, -s $file; -profile(sprintf("prep: euc ok %d\n", ++$n)); - -my $jis = Jcode::euc_jis($euc); -profile(sprintf("prep: jis ok %d\n", ++$n)) unless $jis eq $euc; - -my $sjis = Jcode::euc_sjis($euc); -profile(sprintf("prep: sjis ok %d\n", ++$n)) unless $sjis eq $euc; - -Jcode::load_module("Jcode::Unicode"); - -my $ucs2 = Jcode::euc_ucs2($euc); -profile(sprintf("prep: ucs2 ok %d\n", ++$n)) unless $ucs2 eq $euc; - -my $utf8 = Jcode::euc_utf8($euc); -profile(sprintf("prep: utf8 ok %d\n", ++$n)) unless $utf8 eq $euc; - -my %code2str = - ( - 'euc' => $euc, - 'jis' => $jis, - 'sjis' => $sjis, - 'ucs2' => $ucs2, - 'utf8' => $utf8, - ); - -# by Value - -for my $icode (keys %code2str){ - my $ok; - my $j = Jcode->new($code2str{$icode}, $icode); - for my $ocode (keys %code2str){ - if ($j->$ocode() eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; - } - profile(sprintf("ASCII|X201|X208: %4s -> %4s %s %d\n", - $icode, $ocode, $ok, ++$n )); - - } +my %code2str; +for my $enc (qw/euc sjis jis utf8 ucs2/){ + my $file = "t/table.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; } - -# x212 - -# x212 - -$file = "t/x0212.euc"; -open F, $file or die "$file:$!"; -read F, $euc, -s $file; -#profile(sprintf("prep: euc ok %d\n", ++$n)); -$jis = Jcode::euc_jis($euc); - -%code2str = - ( - 'euc' => $euc, - 'jis' => $jis, - ); - -# by Value - -for my $icode (keys %code2str){ - my $ok; - my $j = Jcode->new($code2str{$icode}, $icode); - for my $ocode (keys %code2str){ - if ($j->$ocode() eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; +my @code2str = keys %code2str; +check("ascii|x0208"); +%code2str = (); +for my $enc (qw/euc jis utf8 ucs2/){ + my $file = "t/x0212.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; +} +@code2str = keys %code2str; +check("x0212"); + +sub check{ + my $table = shift; + for my $icode (@code2str){ + for my $ocode (@code2str){ + my $str = $code2str{$icode}; + my $obj = Jcode->new($str, $icode); + my $evo = eval qq{\$obj->$ocode}; # for perl 5.00x + myok($evo, $code2str{$ocode}, + "$table:Jcode->new(\$str, $icode)->$ocode"); } - profile(sprintf("X212: %4s -> %4s %s %d\n", - $icode, $ocode, $ok, ++$n )); - } } -print 1, "..", $NTESTS, "\n"; -for my $TEST (@TESTS){ - print $TEST; -} - - - - - - - - - +__END__ diff --git a/cpan/dist/Jcode/t/tr.t b/cpan/dist/Jcode/t/tr.t index 1a420305..6b4070aa 100644 --- a/cpan/dist/Jcode/t/tr.t +++ b/cpan/dist/Jcode/t/tr.t @@ -1,41 +1,29 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl +# use strict; -use diagnostics; -$| = 1; # autoflush -use vars qw(@ARGV $ARGV); use Jcode; - -my ($NTESTS, @TESTS) ; - -sub profile { - no strict 'vars'; - my $profile = shift; - print $profile if $ARGV[0]; - $profile =~ m/(not ok|ok) (\d+)$/o; - $profile = "$1 $2\n"; - $NTESTS = $2; - push @TESTS, $profile; +use Test; +BEGIN { plan tests => 10 } + +my $seq = 0; +sub myok{ # overloads Test::ok; + my ($a, $b, $comment) = @_; + print "not " if $a ne $b; + ++$seq; + print "ok $seq # $comment\n"; } - -my $n = 0; my $file; my $hiragana; $file = "t/hiragana.euc"; open F, $file or die "$file:$!"; read F, $hiragana, -s $file; -profile(sprintf("prep: hiragana ok %d\n", ++$n)); my $katakana; $file = "t/zenkaku.euc"; open F, $file or die "$file:$!"; read F, $katakana, -s $file; -profile(sprintf("prep: katakana ok %d\n", ++$n)); my $stripped; $file = "t/stripped.euc"; open F, $file or die "$file:$!"; read F, $stripped, -s $file; -profile(sprintf("prep: stripped ok %d\n", ++$n)); - -#print jcode($katakana)->tr('A-Za-z--','a-zA-Z--'); -#__END__ my %code2str = ( @@ -47,34 +35,33 @@ my %code2str = for my $icode (keys %code2str){ for my $ocode (keys %code2str){ - my $ok; - my $str = $code2str{$icode}; - my $out = jcode(\$str)->tr($icode, $ocode)->euc; - if ($out eq $code2str{$ocode}){ - $ok = "ok"; - }else{ - $ok = "not ok"; - print $out; - } - profile(sprintf("H2Z: %s -> %s %s %d\n", - $icode, $ocode, $ok, ++$n )); + my $ok; + my $str = $code2str{$icode}; + my $out = jcode(\$str)->tr($icode, $ocode)->euc; + myok($out,$code2str{$ocode}, + "H2Z: $icode -> $ocode"); } } # test tr($s,'','d'); -my $ok = (jcode($hiragana)->tr('-','','d')->euc eq $stripped) ? -"ok" : "not ok"; - -profile(sprintf("H2Z: %s -> %s %s %d\n", - '-', "\'\' \'d\'", $ok, ++$n )); - -print 1, "..", $NTESTS, "\n"; -for my $TEST (@TESTS){ - print $TEST; -} - - - - - +myok(jcode($hiragana)->tr('-','','d')->euc, $stripped, + "H2Z: '-', '', d"); + +my $s = '£áģţ'; +my $from = '-ڡ'; + +myok(jcode( $s, 'euc' )->tr( $from, 'A-Z/' )->euc, 'ABC/DEF', "tr"); +myok(jcode( $s, 'euc' )->tr( $from, 'A-Z\/' )->euc, 'ABC\DEF', "tr"); + +local($SIG{__WARN__}) = sub{}; # suppress eval error +our $T_FLAG = 0; +my $p = __PACKAGE__; +my $j = Jcode->new('a'); +$j->tr("//;\$$p\:\:T_FLAG+=1;", "", ""); +$j->tr("", "/;\$$p\:\:T_FLAG+=2;", ""); +$j->tr("", "", ";\$$p\:\:T_FLAG+=4;"); +myok($T_FLAG & 1, 0, "tr/// from escape test"); +myok($T_FLAG & 2, 0, "tr/// to escape test"); +myok($T_FLAG & 4, 0, "tr/// flag escape test"); +__END__ diff --git a/cpan/dist/Jcode/t/unibench.pl b/cpan/dist/Jcode/t/unibench.pl index d9ac7a42..affb8337 100644 --- a/cpan/dist/Jcode/t/unibench.pl +++ b/cpan/dist/Jcode/t/unibench.pl @@ -1,46 +1,48 @@ #!/usr/local/bin/perl -use ExtUtils::testlib; -use Benchmark; use strict; -use lib qw(.); +use Benchmark; +use blib; $| = 1; -require Jcode; -$Jcode::DEBUG = 1; -$Jcode::NOXS = $ARGV[0]; -print "done.\n"; -my $file = "t/table.euc"; -open F, $file or die "$file:$!"; -my $euc; -read F, $euc, -s $file; - -my $ucs2 = Jcode->new($euc)->ucs2; -my $utf8 = Jcode->new($euc)->utf8; - -my $count = $ARGV[1] || 16; +my %code2str; -timethese($count, { - "utf8->ucs2" => \&utf8_ucs2, - "ucs2->utf8" => \&ucs2_utf8, - "ucs2->euc" => \&ucs2_euc, - "ucs2->utf8" => \&ucs2_utf8, -}); - -sub utf8_ucs2{ - &Jcode::utf8_ucs2($utf8); -} - -sub ucs2_utf8{ - &Jcode::ucs2_utf8($ucs2); +my @enc = qw/euc sjis jis utf8/; +for my $enc (@enc){ + my $file = "t/table.$enc"; + open F, $file or die "$file:$!"; + binmode F; + read F, $code2str{$enc}, -s $file; + close F; } -sub euc_ucs2{ - &Jcode::euc_ucs2($ucs2); +use Jcode; +use Unicode::Japanese; +my $tests; + +for my $f (@enc){ + for my $t (@enc){ + $f eq $t and next; + $tests->{"$f->$t"} = + sub { + no strict 'refs'; + Jcode->new($code2str{$f}, $f)->$t eq $code2str{$t} + or die; + }; + } } -sub ucs2_euc{ - &Jcode::ucs2_euc($ucs2); +timethese(0, + $tests); +__END__ +my %tests; +for my $mod (qw/Jcode Unicode::Japanese/){ + eval qq{ require $mod }; + $@ and next; + "$mod loaded."; + no strict 'refs'; + $tests{$mod} = sub { + + } } - diff --git a/cpan/dist/Jcode/t/x0212.euc b/cpan/dist/Jcode/t/x0212.euc index b2fcb568..f6910c30 100644 --- a/cpan/dist/Jcode/t/x0212.euc +++ b/cpan/dist/Jcode/t/x0212.euc @@ -1,288 +1,200 @@ -0x8fa0a0: -0x8fa0c0: -0x8fa0e0: -0x8fa1a0: -0x8fa1c0: -0x8fa1e0: -0x8fa2a0: -0x8fa2c0: Ï -0x8fa2e0: 돢쏢폢 -0x8fa3a0: -0x8fa3c0: -0x8fa3e0: -0x8fa4a0: -0x8fa4c0: -0x8fa4e0: -0x8fa5a0: -0x8fa5c0: -0x8fa5e0: -0x8fa6a0: -0x8fa6c0: -0x8fa6e0: Ꮶ⏦㏦䏦 鏦 -0x8fa7a0: -0x8fa7c0: ÏďŏƏǏȏɏʏˏ̏͏ -0x8fa7e0: -0x8fa8a0: -0x8fa8c0: -0x8fa8e0: -0x8fa9a0: -0x8fa9c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏ -0x8fa9e0: -0x8faaa0: -0x8faac0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8faae0: Ꮺ⏪㏪䏪只揪珪菪鏪ꏪ돪쏪폪 -0x8faba0: -0x8fabc0: ŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fabe0: Ꮻ⏫㏫䏫叫揫珫菫鏫ꏫ돫쏫폫 -0x8faca0: -0x8facc0: -0x8face0: -0x8fada0: -0x8fadc0: -0x8fade0: -0x8faea0: -0x8faec0: -0x8faee0: -0x8fafa0: -0x8fafc0: -0x8fafe0: -0x8fb0a0: -0x8fb0c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb0e0: Ᏸ⏰㏰䏰台揰珰菰鏰ꏰ돰쏰폰 -0x8fb1a0: -0x8fb1c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb1e0: Ᏹ⏱㏱䏱叱揱珱菱鏱ꏱ돱쏱폱 -0x8fb2a0: -0x8fb2c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb2e0: Ᏺ⏲㏲䏲史揲珲菲鏲ꏲ돲쏲폲 -0x8fb3a0: -0x8fb3c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb3e0: Ᏻ⏳㏳䏳右揳珳菳鏳ꏳ돳쏳폳 -0x8fb4a0: -0x8fb4c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb4e0: Ᏼ⏴㏴䏴叴援珴菴鏴ꏴ돴쏴폴 -0x8fb5a0: -0x8fb5c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb5e0: Ᏽ⏵㏵䏵叵揵珵菵鏵ꏵ돵쏵폵 -0x8fb6a0: -0x8fb6c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb6e0: ⏶㏶䏶叶揶珶菶鏶ꏶ돶쏶폶 -0x8fb7a0: -0x8fb7c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb7e0: ⏷㏷䏷号揷珷菷鏷ꏷ돷쏷폷 -0x8fb8a0: -0x8fb8c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb8e0: ᏸ⏸㏸䏸司揸珸菸鏸ꏸ돸쏸폸 -0x8fb9a0: -0x8fb9c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fb9e0: ᏹ⏹㏹䏹叹揹珹菹鏹ꏹ돹쏹폹 -0x8fbaa0: -0x8fbac0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbae0: ᏺ⏺㏺䏺叺揺珺菺鏺ꏺ돺쏺폺 -0x8fbba0: -0x8fbbc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbbe0: ᏻ⏻㏻䏻叻揻珻菻鏻ꏻ돻쏻폻 -0x8fbca0: -0x8fbcc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbce0: ᏼ⏼㏼䏼叼揼珼菼鏼ꏼ돼쏼폼 -0x8fbda0: -0x8fbdc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbde0: ᏽ⏽㏽䏽叽揽珽菽鏽ꏽ돽쏽폽 -0x8fbea0: -0x8fbec0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbee0: ⏾㏾䏾叾揾現菾鏾ꏾ돾쏾폾 -0x8fbfa0: -0x8fbfc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fbfe0: ⏿㏿䏿叿揿珿菿鏿ꏿ돿쏿폿 -0x8fc0a0: -0x8fc0c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc0e0: -0x8fc1a0: -0x8fc1c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc1e0: -0x8fc2a0: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾ -0x8fc2c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc2e0: -0x8fc3a0: áâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþ -0x8fc3c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc3e0: -0x8fc4a0: ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľ -0x8fc4c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc4e0: -0x8fc5a0: šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽž -0x8fc5c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc5e0: -0x8fc6a0: ơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾ -0x8fc6c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc6e0: -0x8fc7a0: ǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾ -0x8fc7c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc7e0: -0x8fc8a0: ȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾ -0x8fc8c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc8e0: -0x8fc9a0: ɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾ -0x8fc9c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fc9e0: -0x8fcaa0: ʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾ -0x8fcac0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcae0: -0x8fcba0: ˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾ -0x8fcbc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcbe0: -0x8fcca0: ̴̵̶̷̸̡̢̧̨̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼̽̾ -0x8fccc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcce0: -0x8fcda0: ͣͤͥͦͧͨͩͪͫͬͭͮͯ͢͡ͰͱͲͳʹ͵Ͷͷͺͻͼͽ; -0x8fcdc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcde0: -0x8fcea0: ΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξ -0x8fcec0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcee0: -0x8fcfa0: ϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾ -0x8fcfc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fcfe0: -0x8fd0a0: СТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмно -0x8fd0c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd0e0: -0x8fd1a0: ѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾ -0x8fd1c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd1e0: -0x8fd2a0: ҡҢңҤҥҦҧҨҩҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽҾ -0x8fd2c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd2e0: -0x8fd3a0: ӡӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳӴӵӶӷӸӹӺӻӼӽӾ -0x8fd3c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd3e0: -0x8fd4a0: ԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺԻԼԽԾ -0x8fd4c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd4e0: -0x8fd5a0: աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվ -0x8fd5c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd5e0: -0x8fd6a0: ְֱֲֳִֵֶַָֹֺֻּֽ֢֣֤֥֦֧֪֭֮֡֨֩֫֬֯־ -0x8fd6c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd6e0: -0x8fd7a0: סעףפץצקרשתׯװױײ׳״ -0x8fd7c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd7e0: -0x8fd8a0: ءآأؤإئابةتثجحخدذرزسشصضطظعغػؼؽؾ -0x8fd8c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd8e0: -0x8fd9a0: ١٢٣٤٥٦٧٨٩٪٫٬٭ٮٯٰٱٲٳٴٵٶٷٸٹٺٻټٽپ -0x8fd9c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fd9e0: -0x8fdaa0: ڡڢڣڤڥڦڧڨکڪګڬڭڮگڰڱڲڳڴڵڶڷڸڹںڻڼڽھ -0x8fdac0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdae0: -0x8fdba0: ۣۡۢۤۥۦۧۨ۩۪ۭ۫۬ۮۯ۰۱۲۳۴۵۶۷۸۹ۺۻۼ۽۾ -0x8fdbc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdbe0: -0x8fdca0: ܡܢܣܤܥܦܧܨܩܪܫܬܭܮܯܱܴܷܸܹܻܼܾܰܲܳܵܶܺܽ -0x8fdcc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdce0: -0x8fdda0: ݡݢݣݤݥݦݧݨݩݪݫݬݭݮݯݰݱݲݳݴݵݶݷݸݹݺݻݼݽݾ -0x8fddc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdde0: -0x8fdea0: ޡޢޣޤޥަާިީުޫެޭޮޯްޱ -0x8fdec0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdee0: -0x8fdfa0: ߡߢߣߤߥߦߧߨߩߪ߲߫߬߭߮߯߰߱߳ߴߵ߶߷߸߹ߺ߽߾ -0x8fdfc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fdfe0: -0x8fe0a0: ࡏ࣏एॏএਏએଏஏఏಏഏ൏ඏාฏ๏ຏ༏ཏ -0x8fe0c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe0e0: -0x8fe1a0: ᡏᢏᣏᤏ᥏ᦏᨏᩏᬏᮏᯏᰏᱏᴏᵏᶏ᷏ḏṏẏỏἏ -0x8fe1c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe1e0: -0x8fe2a0: ⡏⢏⣏⤏⥏⦏⧏⨏⩏⪏⫏⬏⭏⮏⯏Ⰿⱏⲏⳏⴏⵏⶏ⸏⹏⺏⻏⼏⽏ -0x8fe2c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe2e0: -0x8fe3a0: 㡏㢏㣏㤏㥏㦏㧏㨏㩏㪏㫏㬏㭏㮏㯏㰏㱏㲏㳏㴏㵏㶏㷏㸏㹏㺏㻏㼏㽏 -0x8fe3c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe3e0: -0x8fe4a0: 䡏䢏䣏䤏䥏䦏䧏䨏䩏䪏䫏䬏䭏䮏䯏䰏䱏䲏䳏䴏䵏䶏䷏丏乏亏仏伏住 -0x8fe4c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe4e0: -0x8fe5a0: 塏墏壏夏奏妏姏娏婏媏嫏嬏孏宏寏小屏岏峏崏嵏嶏巏帏幏序廏式彏 -0x8fe5c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe5e0: -0x8fe6a0: 桏梏棏椏楏榏槏樏橏檏櫏欏歏殏每氏汏沏泏洏浏涏淏渏湏溏滏漏潏 -0x8fe6c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe6e0: -0x8fe7a0: 硏碏磏礏祏福秏稏穏窏竏笏筏箏篏簏籏粏糏紏絏綏総縏繏纏经缏罏 -0x8fe7c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe7e0: -0x8fe8a0: 衏袏裏褏襏規觏訏詏誏諏謏譏讏诏谏豏貏賏贏赏趏跏踏蹏躏軏輏轏 -0x8fe8c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe8e0: -0x8fe9a0: 顏颏飏餏饏馏駏騏驏骏髏鬏魏鮏鯏鰏鱏鲏鳏鴏鵏鶏鷏鸏鹏麏黏鼏齏 -0x8fe9c0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fe9e0: -0x8feaa0: ꡏꢏ꣏ꤏꥏꦏꧏꨏꪏꭏꮏꯏ갏걏겏곏괏굏궏귏긏깏꺏껏꼏꽏 -0x8feac0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8feae0: -0x8feba0: 롏뢏룏뤏륏릏맏먏멏몏뫏묏뭏뮏믏및뱏벏볏봏뵏붏뷏븏빏뺏뻏뼏뽏 -0x8febc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8febe0: -0x8feca0: 졏좏죏줏쥏즏짏쨏쩏쪏쫏쬏쭏쮏쯏찏챏첏쳏촏쵏춏췏츏칏캏컏켏콏 -0x8fecc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fece0: -0x8feda0: -0x8fedc0: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏ -0x8fede0: -0x8feea0: -0x8feec0: -0x8feee0: -0x8fefa0: -0x8fefc0: -0x8fefe0: -0x8ff0a0: -0x8ff0c0: -0x8ff0e0: -0x8ff1a0: -0x8ff1c0: -0x8ff1e0: -0x8ff2a0: -0x8ff2c0: -0x8ff2e0: -0x8ff3a0: -0x8ff3c0: -0x8ff3e0: -0x8ff4a0: -0x8ff4c0: -0x8ff4e0: -0x8ff5a0: -0x8ff5c0: -0x8ff5e0: -0x8ff6a0: -0x8ff6c0: -0x8ff6e0: -0x8ff7a0: -0x8ff7c0: -0x8ff7e0: -0x8ff8a0: -0x8ff8c0: -0x8ff8e0: -0x8ff9a0: -0x8ff9c0: -0x8ff9e0: -0x8ffaa0: -0x8ffac0: -0x8ffae0: -0x8ffba0: -0x8ffbc0: -0x8ffbe0: -0x8ffca0: -0x8ffcc0: -0x8ffce0: -0x8ffda0: -0x8ffdc0: -0x8ffde0: -0x8ffea0: -0x8ffec0: -0x8ffee0: -0x8fffa0: -0x8fffc0: -0x8fffe0: +0x2220: ~ +0x2240: Ï +0x2260: 돢쏢폢 +0x2660: Ꮶ⏦㏦䏦 鏦 +0x2740: ÏďŏƏǏȏɏʏˏ̏͏ +0x2760: +0x2920: +0x2940: ÏďŏƏǏȏɏʏˏ̏͏ΏϏ +0x2a20: +0x2a40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x2a60: Ꮺ⏪㏪䏪只揪珪菪鏪ꏪ돪쏪폪 +0x2b20: +0x2b40: ŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x2b60: Ꮻ⏫㏫䏫叫揫珫菫鏫ꏫ돫쏫폫 +0x3020: +0x3040: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3060: Ᏸ⏰㏰䏰台揰珰菰鏰ꏰ돰쏰폰 +0x3120: +0x3140: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3160: Ᏹ⏱㏱䏱叱揱珱菱鏱ꏱ돱쏱폱 +0x3220: +0x3240: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3260: Ᏺ⏲㏲䏲史揲珲菲鏲ꏲ돲쏲폲 +0x3320: +0x3340: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3360: Ᏻ⏳㏳䏳右揳珳菳鏳ꏳ돳쏳폳 +0x3420: +0x3440: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3460: Ᏼ⏴㏴䏴叴援珴菴鏴ꏴ돴쏴폴 +0x3520: +0x3540: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3560: Ᏽ⏵㏵䏵叵揵珵菵鏵ꏵ돵쏵폵 +0x3620: +0x3640: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3660: ⏶㏶䏶叶揶珶菶鏶ꏶ돶쏶폶 +0x3720: +0x3740: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3760: ⏷㏷䏷号揷珷菷鏷ꏷ돷쏷폷 +0x3820: +0x3840: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3860: ᏸ⏸㏸䏸司揸珸菸鏸ꏸ돸쏸폸 +0x3920: +0x3940: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3960: ᏹ⏹㏹䏹叹揹珹菹鏹ꏹ돹쏹폹 +0x3a20: +0x3a40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3a60: ᏺ⏺㏺䏺叺揺珺菺鏺ꏺ돺쏺폺 +0x3b20: +0x3b40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3b60: ᏻ⏻㏻䏻叻揻珻菻鏻ꏻ돻쏻폻 +0x3c20: +0x3c40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3c60: ᏼ⏼㏼䏼叼揼珼菼鏼ꏼ돼쏼폼 +0x3d20: +0x3d40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3d60: ᏽ⏽㏽䏽叽揽珽菽鏽ꏽ돽쏽폽 +0x3e20: +0x3e40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3e60: ⏾㏾䏾叾揾現菾鏾ꏾ돾쏾폾 +0x3f20: +0x3f40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x3f60: ⏿㏿䏿叿揿珿菿鏿ꏿ돿쏿폿 +0x4020: +0x4040: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4060: +0x4120: +0x4140: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4160: +0x4220: ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ +0x4240: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4260: +0x4320: áâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ +0x4340: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4360: +0x4420: ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿ +0x4440: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4460: +0x4520: šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ +0x4540: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4560: +0x4620: ơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿ +0x4640: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4660: +0x4720: ǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴǵǶǷǸǹǺǻǼǽǾǿ +0x4740: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4760: +0x4820: ȡȢȣȤȥȦȧȨȩȪȫȬȭȮȯȰȱȲȳȴȵȶȷȸȹȺȻȼȽȾȿ +0x4840: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4860: +0x4920: ɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿ +0x4940: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4960: +0x4a20: ʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿ +0x4a40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4a60: +0x4b20: ˡˢˣˤ˥˦˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾˿ +0x4b40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4b60: +0x4c20: ̴̵̶̷̸̡̢̧̨̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼̽̾̿ +0x4c40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4c60: +0x4d20: ͣͤͥͦͧͨͩͪͫͬͭͮͯ͢͡ͰͱͲͳʹ͵Ͷͷͺͻͼͽ;Ϳ +0x4d40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4d60: +0x4e20: ΡΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξο +0x4e40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4e60: +0x4f20: ϡϢϣϤϥϦϧϨϩϪϫϬϭϮϯϰϱϲϳϴϵ϶ϷϸϹϺϻϼϽϾϿ +0x4f40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x4f60: +0x5020: СТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп +0x5040: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5060: +0x5120: ѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿ +0x5140: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5160: +0x5220: ҡҢңҤҥҦҧҨҩҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽҾҿ +0x5240: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5260: +0x5320: ӡӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳӴӵӶӷӸӹӺӻӼӽӾӿ +0x5340: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5360: +0x5420: ԡԢԣԤԥԦԧԨԩԪԫԬԭԮԯԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿ +0x5440: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5460: +0x5520: աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտ +0x5540: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5560: +0x5620: ְֱֲֳִֵֶַָֹֺֻּֽ֢֣֤֥֦֧֪֭֮֡֨֩֫֬֯־ֿ +0x5640: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5660: +0x5720: סעףפץצקרשתׯװױײ׳״ +0x5740: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5760: +0x5820: ءآأؤإئابةتثجحخدذرزسشصضطظعغػؼؽؾؿ +0x5840: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5860: +0x5920: ١٢٣٤٥٦٧٨٩٪٫٬٭ٮٯٰٱٲٳٴٵٶٷٸٹٺٻټٽپٿ +0x5940: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5960: +0x5a20: ڡڢڣڤڥڦڧڨکڪګڬڭڮگڰڱڲڳڴڵڶڷڸڹںڻڼڽھڿ +0x5a40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5a60: +0x5b20: ۣۡۢۤۥۦۧۨ۩۪ۭ۫۬ۮۯ۰۱۲۳۴۵۶۷۸۹ۺۻۼ۽۾ۿ +0x5b40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5b60: +0x5c20: ܡܢܣܤܥܦܧܨܩܪܫܬܭܮܯܱܴܷܸܹܻܼܾܰܲܳܵܶܺܽܿ +0x5c40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5c60: +0x5d20: ݡݢݣݤݥݦݧݨݩݪݫݬݭݮݯݰݱݲݳݴݵݶݷݸݹݺݻݼݽݾݿ +0x5d40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5d60: +0x5e20: ޡޢޣޤޥަާިީުޫެޭޮޯްޱ +0x5e40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5e60: +0x5f20: ߡߢߣߤߥߦߧߨߩߪ߲߫߬߭߮߯߰߱߳ߴߵ߶߷߸߹ߺ߽߾߿ +0x5f40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x5f60: +0x6020: ࡏ࣏एॏএਏએଏஏఏಏഏ൏ඏාฏ๏ຏ༏ཏྏ +0x6040: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6060: +0x6120: ᡏᢏᣏᤏ᥏ᦏᨏᩏᬏᮏᯏᰏᱏᴏᵏᶏ᷏ḏṏẏỏἏᾏ +0x6140: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6160: +0x6220: ⡏⢏⣏⤏⥏⦏⧏⨏⩏⪏⫏⬏⭏⮏⯏Ⰿⱏⲏⳏⴏⵏⶏ⸏⹏⺏⻏⼏⽏⾏ +0x6240: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6260: +0x6320: 㡏㢏㣏㤏㥏㦏㧏㨏㩏㪏㫏㬏㭏㮏㯏㰏㱏㲏㳏㴏㵏㶏㷏㸏㹏㺏㻏㼏㽏㾏 +0x6340: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6360: +0x6420: 䡏䢏䣏䤏䥏䦏䧏䨏䩏䪏䫏䬏䭏䮏䯏䰏䱏䲏䳏䴏䵏䶏䷏丏乏亏仏伏住侏 +0x6440: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6460: +0x6520: 塏墏壏夏奏妏姏娏婏媏嫏嬏孏宏寏小屏岏峏崏嵏嶏巏帏幏序廏式彏徏 +0x6540: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6560: +0x6620: 桏梏棏椏楏榏槏樏橏檏櫏欏歏殏每氏汏沏泏洏浏涏淏渏湏溏滏漏潏澏 +0x6640: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6660: +0x6720: 硏碏磏礏祏福秏稏穏窏竏笏筏箏篏簏籏粏糏紏絏綏総縏繏纏经缏罏羏 +0x6740: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6760: +0x6820: 衏袏裏褏襏規觏訏詏誏諏謏譏讏诏谏豏貏賏贏赏趏跏踏蹏躏軏輏轏辏 +0x6840: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6860: +0x6920: 顏颏飏餏饏馏駏騏驏骏髏鬏魏鮏鯏鰏鱏鲏鳏鴏鵏鶏鷏鸏鹏麏黏鼏齏龏 +0x6940: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6960: +0x6a20: ꡏꢏ꣏ꤏꥏꦏꧏꨏꪏꭏꮏꯏ갏걏겏곏괏굏궏귏긏깏꺏껏꼏꽏꾏 +0x6a40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6a60: +0x6b20: 롏뢏룏뤏륏릏맏먏멏몏뫏묏뭏뮏믏및뱏벏볏봏뵏붏뷏븏빏뺏뻏뼏뽏뾏 +0x6b40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6b60: +0x6c20: 졏좏죏줏쥏즏짏쨏쩏쪏쫏쬏쭏쮏쯏찏챏첏쳏촏쵏춏췏츏칏캏컏켏콏쾏 +0x6c40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6c60: +0x6d20: +0x6d40: ÏďŏƏǏȏɏʏˏ̏͏ΏϏЏяҏӏԏՏ֏؏ُڏۏݏޏ +0x6d60: |
