/[suikacvs]/messaging/manakai/lib/Message/MIME/Charset.pm
Suika

Diff of /messaging/manakai/lib/Message/MIME/Charset.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by wakaba, Fri Jul 19 11:49:46 2002 UTC revision 1.12 by wakaba, Sun Jul 21 03:25:23 2002 UTC
# Line 16  Perl module for MIME charset. Line 16  Perl module for MIME charset.
16    
17  package Message::MIME::Charset;  package Message::MIME::Charset;
18  use strict;  use strict;
19  use vars qw(%CHARSET %REG $VERSION);  use vars qw(%CHARSET %MSNAME2IANANAME %REG $VERSION);
20  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
21    
22  &_builtin_charset;  &_builtin_charset;
# Line 99  my %_MINIMUMIZER = ( Line 99  my %_MINIMUMIZER = (
99          'utf-32be'      => \&_name_utf32be,          'utf-32be'      => \&_name_utf32be,
100  );  );
101    
102    %MSNAME2IANANAME = (
103            'iso-2022-jp'   => 'x-iso2022jp-cp932',
104            'ks_c_5601-1987'        => 'windows-949',
105    );
106    
107  sub make_charset ($%) {  sub make_charset ($%) {
108    my $name = shift;    my $name = shift;
109    return unless $name;  ## Note: charset "0" is not supported.    return unless $name;  ## Note: charset "0" is not supported.
# Line 157  sub name_minimumize ($$) { Line 162  sub name_minimumize ($$) {
162    (charset => $charset);    (charset => $charset);
163  }  }
164    
165    sub msname2iananame ($) {
166      my $mscharset = shift;
167      $MSNAME2IANANAME{$mscharset} || $mscharset;
168    }
169    
170  sub _name_7bit_iso2022 ($$) {shift;  sub _name_7bit_iso2022 ($$) {shift;
171    my $s = shift;    my $s = shift;
172    if ($s =~ /[\x0E\x0F\x1B]/) {    if ($s =~ /[\x0E\x0F\x1B]/) {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24