line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Egg::Plugin::Charset::EUC_JP; |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: EUC_JP.pm 337 2008-05-14 12:30:09Z lushe $ |
6
|
|
|
|
|
|
|
# |
7
|
1
|
|
|
1
|
|
1303
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
8
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
9
|
1
|
|
|
1
|
|
6
|
use Jcode; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
10
|
1
|
|
|
1
|
|
6
|
use base qw/Egg::Plugin::Charset/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
207
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '3.00'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _setup { |
15
|
0
|
|
|
0
|
|
|
my($e)= @_; |
16
|
0
|
|
|
|
|
|
my $c= $e->config; |
17
|
0
|
|
|
|
|
|
$c->{content_language} = 'ja'; |
18
|
0
|
|
|
|
|
|
$c->{content_type} = 'text/html'; |
19
|
0
|
|
|
|
|
|
$c->{charset_out} = 'euc-jp'; |
20
|
0
|
|
|
|
|
|
$e->next::method; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
sub _convert_output_body { |
23
|
0
|
|
|
0
|
|
|
my $e= shift; |
24
|
0
|
|
0
|
|
|
|
my $body= shift || return 0; |
25
|
0
|
|
|
|
|
|
$$body= Jcode->new($body)->euc; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Egg::Plugin::Charset::EUC_JP - Plugin to output contents with EUC-JP. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use Egg qw/ Charset::EUC_JP /; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This plugin is a subclass of L<Egg::Plugin::Charset>. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Contents are output with EUC-JP. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
The conversion of the character-code is L<Jcode>. Has gone. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 SEE ALSO |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
L<Egg::Release>, |
51
|
|
|
|
|
|
|
L<Egg::Plugin::Charset>, |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
62
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
63
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|