Parent Directory
|
Revision Log
|
Patch
| revision 1.3 by wakaba, Mon Sep 16 02:20:18 2002 UTC | revision 1.4 by wakaba, Mon Sep 16 06:35:16 2002 UTC | |
|---|---|---|
| # | Line 254 sub new_object { | Line 254 sub new_object { |
| 254 | Gdesignation => "\x42", ## F of designation or 0 | Gdesignation => "\x42", ## F of designation or 0 |
| 255 | Ginvoke => 1, | Ginvoke => 1, |
| 256 | }, | }, |
| 257 | undef_char => ["\x3F", {type => 'G94', charset => 'B'}], | |
| 258 | use_revision => 1, ## Output IRR | use_revision => 1, ## Output IRR |
| 259 | }; | }; |
| 260 | \%C; | \%C; |
| # | Line 571 sub internal_to_iso2022 ($\%) { | Line 572 sub internal_to_iso2022 ($\%) { |
| 572 | if (defined $t) { | if (defined $t) { |
| 573 | $r .= $t; | $r .= $t; |
| 574 | } else { | } else { |
| 575 | $r .= _i2g ("\x3F", $C, type => 'G94', charset => 'B'); | $r .= _i2g ($C->{option}->{undef_char}->[0], $C, |
| 576 | %{ $C->{option}->{undef_char}->[1] }); | |
| 577 | } | } |
| 578 | } | } |
| 579 | $r . _back2ascii ($C); | $r . _back2ascii ($C); |
| # | Line 625 sub _i2c ($%%) { | Line 627 sub _i2c ($%%) { |
| 627 | sub _i2g ($%%) { | sub _i2g ($%%) { |
| 628 | my ($s, $C, %O) = @_; | my ($s, $C, %O) = @_; |
| 629 | my $r = ''; | my $r = ''; |
| 630 | my $set = $CHARSET{$O{type}}->{$O{charset}}; | my $set = $CHARSET{$O{type}}->{$O{charset}. |
| 631 | ($O{revision}&&$C->{option}->{use_revision}?$O{revision}:'')}; | |
| 632 | my $set0 = $CHARSET{$O{type}}->{$O{charset_id}}; | my $set0 = $CHARSET{$O{type}}->{$O{charset_id}}; |
| 633 | ## -- designate character set | ## -- designate character set |
| 634 | my $G = 0; | my $G = 0; |
| # | Line 679 sub _i2g ($%%) { | Line 682 sub _i2g ($%%) { |
| 682 | } elsif ($C->{C0}->{'C_SS'.$G}) { | } elsif ($C->{C0}->{'C_SS'.$G}) { |
| 683 | $r .= _i2c ($C->{C0}->{'C_SS'.$G}, $C, type => 'C0') || return undef; | $r .= _i2c ($C->{C0}->{'C_SS'.$G}, $C, type => 'C0') || return undef; |
| 684 | } else { ## Both C0 and C1 set do not have SS2/3. | } else { ## Both C0 and C1 set do not have SS2/3. |
| 685 | $left = 0 if $G == 1 && !$C->{C0}->{C_LS1}; | |
| 686 | $r .= __invoke ($C, $G => $left) if $C->{$left?'GL':'GR'} ne 'G'.$G; | $r .= __invoke ($C, $G => $left) if $C->{$left?'GL':'GR'} ne 'G'.$G; |
| 687 | } | } |
| 688 | } else { | } else { |
| # | Line 755 ISO/IEC 8859, "8-Bit Single-Byte Coded G | Line 759 ISO/IEC 8859, "8-Bit Single-Byte Coded G |
| 759 | ||
| 760 | Encode, perlunicode | Encode, perlunicode |
| 761 | ||
| 762 | =head1 TODO | |
| 763 | ||
| 764 | =over 4 | |
| 765 | ||
| 766 | =item NCR (coding system other than ISO/IEC 2022) support | |
| 767 | ||
| 768 | =over 2 | |
| 769 | ||
| 770 | =item ESC 02/05 02/15 03/x of X Compound Text | |
| 771 | ||
| 772 | =back | |
| 773 | ||
| 774 | =item Output of control character sets, single control functions | |
| 775 | ||
| 776 | =item Designation sequence of control character sets (input) | |
| 777 | ||
| 778 | =item Special graphic character sets such as G3 of EUC-TW | |
| 779 | ||
| 780 | =item SUPER SHIFT (SS) invoke function of old control character set | |
| 781 | ||
| 782 | =item Safe transparent of control string (ISO/IEC 6429) | |
| 783 | ||
| 784 | =item Output of unoutputable characters as alternative notation such as SGML-like entity | |
| 785 | ||
| 786 | =item C0 set invoked to CR area like ISIRI code | |
| 787 | ||
| 788 | Really need? | |
| 789 | ||
| 790 | =item special treatment of 0x20, 0x7E, 0xA0, 0xFF | |
| 791 | ||
| 792 | For example, GB mongolian sets use MSP (MONGOLIAN SPACE) | |
| 793 | with these code positions. | |
| 794 | ||
| 795 | And, no less coding systems does not use (or does ban using) DEL. | |
| 796 | ||