line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Egg::Plugin::Charset::UTF8; |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Id: UTF8.pm 337 2008-05-14 12:30:09Z lushe $ |
6
|
|
|
|
|
|
|
# |
7
|
1
|
|
|
1
|
|
460
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
8
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
9
|
1
|
|
|
1
|
|
1913
|
use Jcode; |
|
1
|
|
|
|
|
96145
|
|
|
1
|
|
|
|
|
163
|
|
10
|
1
|
|
|
1
|
|
14
|
use base qw/Egg::Plugin::Charset/; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
610
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '3.00'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _setup { |
15
|
0
|
|
|
0
|
|
|
my($e)= @_; |
16
|
0
|
|
|
|
|
|
my $c= $e->config; |
17
|
0
|
|
0
|
|
|
|
$c->{content_language} ||= 'ja'; |
18
|
0
|
|
0
|
|
|
|
$c->{content_type} ||= 'text/html'; |
19
|
0
|
|
|
|
|
|
$c->{charset_out}= 'utf-8'; |
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
|
|
|
|
|
|
Jcode->new($body); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Egg::Plugin::Charset::UTF8 - Plugin to output contents with UTF-8. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
use Egg qw/ Charset::UTF8 /; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This plugin is a subclass of L<Egg::Plugin::Charset>. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Contents are output with UTF-8. |
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
|
|
|
|
|
|
|
L<Jcode>, |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 AUTHOR |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright (C) 2008 Bee Flag, Corp. E<lt>L<http://egg.bomcity.com/>E<gt>. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
63
|
|
|
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.6 or, |
64
|
|
|
|
|
|
|
at your option, any later version of Perl 5 you may have available. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|