/[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.10 by wakaba, Wed Jul 17 00:33:29 2002 UTC revision 1.11 by wakaba, Fri Jul 19 11:49:46 2002 UTC
# Line 70  my %_MINIMUMIZER = ( Line 70  my %_MINIMUMIZER = (
70          'euc-jisx0213'  => \&_name_euc_japan,          'euc-jisx0213'  => \&_name_euc_japan,
71          'euc-jisx0213-plane1'   => \&_name_euc_japan,          'euc-jisx0213-plane1'   => \&_name_euc_japan,
72          'x-euc-jisx0213-packed' => \&_name_euc_japan,          'x-euc-jisx0213-packed' => \&_name_euc_japan,
73          'x-iso-2022'    => \&_name_8bit_iso_2022,          'x-iso-2022'    => \&_name_8bit_iso2022,
74          'iso-2022-cn'   => \&_name_8bit_iso_2022,          'iso-2022-cn'   => \&_name_8bit_iso2022,
75          'iso-2022-cn-ext'       => \&_name_8bit_iso_2022,          'iso-2022-cn-ext'       => \&_name_8bit_iso2022,
76          'iso-2022-int-1'        => \&_name_net_ascii_8bit,          'iso-2022-int-1'        => \&_name_net_ascii_8bit,
77          'iso-2022-jp'   => \&_name_8bit_iso_2022,          'iso-2022-jp'   => \&_name_8bit_iso2022,
78          'iso-2022-jp-1' => \&_name_8bit_iso_2022,          'iso-2022-jp-1' => \&_name_8bit_iso2022,
79          'iso-2022-jp-2' => \&_name_8bit_iso_2022,          'iso-2022-jp-2' => \&_name_8bit_iso2022,
80          'iso-2022-jp-3' => \&_name_8bit_iso_2022,          'iso-2022-jp-3' => \&_name_8bit_iso2022,
81          'iso-2022-jp-3-plane1'  => \&_name_8bit_iso_2022,          'iso-2022-jp-3-plane1'  => \&_name_8bit_iso2022,
82          'iso-2022-kr'   => \&_name_8bit_iso_2022,          'iso-2022-kr'   => \&_name_8bit_iso2022,
83          'iso-8859-1'    => \&_name_8bit_iso_2022,          'iso-8859-1'    => \&_name_8bit_iso2022,
84          'iso-10646-j-1' => \&_name_utf16be,          'iso-10646-j-1' => \&_name_utf16be,
85          'iso-10646-ucs-2'       => \&_name_utf16be,          'iso-10646-ucs-2'       => \&_name_utf16be,
86          'iso-10646-ucs-4'       => \&_name_utf32be,          'iso-10646-ucs-4'       => \&_name_utf32be,
87          'iso-10646-ucs-basic'   => \&_name_utf16be,          'iso-10646-ucs-basic'   => \&_name_utf16be,
88          'iso-10646-unicode-latin1'      => \&_name_utf16be,          'iso-10646-unicode-latin1'      => \&_name_utf16be,
89          jis_x0201       => \&_name_shift_jis,          jis_x0201       => \&_name_shift_jis,
90          junet   => \&_name_8bit_iso_2022,          junet   => \&_name_8bit_iso2022,
91          'x-junet8'      => \&_name_net_ascii_8bit,          'x-junet8'      => \&_name_net_ascii_8bit,
92          shift_jis       => \&_name_shift_jis,          shift_jis       => \&_name_shift_jis,
93          shift_jisx0213  => \&_name_shift_jis,          shift_jisx0213  => \&_name_shift_jis,
# Line 245  sub _name_net_ascii_8bit ($) { Line 245  sub _name_net_ascii_8bit ($) {
245    }    }
246  }  }
247    
248  sub _name_8bit_iso_2022 ($$) {  sub _name_8bit_iso2022 ($$) {
249    my $name = shift; my $s = shift;    my $name = shift; my $s = shift;
250    return (charset => 'us-ascii') unless $s =~ /[\x1B\x0E\x0F\x80-\xFF]/;    return (charset => 'us-ascii') unless $s =~ /[\x1B\x0E\x0F\x80-\xFF]/;
251    if ($s =~ /[\x80-\xFF]/) {    if ($s =~ /[\x80-\xFF]/) {
# Line 301  sub _name_euc_gb ($$) { Line 301  sub _name_euc_gb ($$) {
301    } elsif ($s =~ /[\x0E\x0F]/) {    } elsif ($s =~ /[\x0E\x0F]/) {
302      (charset => 'gb2312');      ## Actually, this is not "gb2312"      (charset => 'gb2312');      ## Actually, this is not "gb2312"
303    } else {    } else {
304      _name_7bit_iso_2022 ($name, $s);      _name_7bit_iso2022 ($name, $s);
305    }    }
306  }  }
307    
# Line 336  sub _name_euc_japan ($$) { Line 336  sub _name_euc_japan ($$) {
336    } elsif ($s =~ /\x0E|\x0F|\x1B[\x4E\x4F]/) {    } elsif ($s =~ /\x0E|\x0F|\x1B[\x4E\x4F]/) {
337      (charset => 'euc-jisx0213');        ## Actually, this is not euc-japan      (charset => 'euc-jisx0213');        ## Actually, this is not euc-japan
338    } else {    } else {
339      _name_7bit_iso_2022 ($name, $s);      _name_7bit_iso2022 ($name, $s);
340    }    }
341  }  }
342    
# Line 377  sub _name_shift_jis ($$) { Line 377  sub _name_shift_jis ($$) {
377        (charset => 'jis_x0201');        (charset => 'jis_x0201');
378      }      }
379    } else {    } else {
380      _name_7bit_iso_2022 ($name, $s);      _name_7bit_iso2022 ($name, $s);
381    }    }
382  }  }
383    

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24