33 |
|
|
34 |
encoder => sub { $_[1] }, |
encoder => sub { $_[1] }, |
35 |
decoder => sub { $_[1] }, |
decoder => sub { $_[1] }, |
36 |
|
|
37 |
|
mime_text => 1, |
38 |
}; |
}; |
39 |
|
|
40 |
$CHARSET{'iso-2022-int-1'} = { |
$CHARSET{'iso-2022-int-1'} = { |
42 |
|
|
43 |
encoder => sub { $_[1] }, |
encoder => sub { $_[1] }, |
44 |
decoder => sub { $_[1] }, |
decoder => sub { $_[1] }, |
45 |
|
|
46 |
|
mime_text => 1, |
47 |
}; |
}; |
48 |
|
|
49 |
$CHARSET{'unknown-8bit'} = { |
$CHARSET{'unknown-8bit'} = { |
87 |
sub encode ($$) { |
sub encode ($$) { |
88 |
my ($charset, $s) = (lc shift, shift); |
my ($charset, $s) = (lc shift, shift); |
89 |
if (ref $CHARSET{$charset}->{encoder}) { |
if (ref $CHARSET{$charset}->{encoder}) { |
90 |
return (&{$CHARSET{$charset}->{encoder}} ($charset, $s), 1); |
return (&{$CHARSET{$charset}->{encoder}} ($charset, $s), success => 1); |
91 |
} |
} |
92 |
($s, 0); |
($s, success => 0); |
93 |
} |
} |
94 |
|
|
95 |
sub decode ($$) { |
sub decode ($$) { |