line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::Plugin::Charset; |
2
|
2
|
|
|
2
|
|
44950
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
59
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
70
|
|
4
|
2
|
|
|
2
|
|
42
|
use 5.00800; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
402
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.04'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub HTTP::MobileAgent::can_display_utf8 { |
8
|
8
|
|
|
8
|
0
|
13116
|
my $self = shift; |
9
|
8
|
100
|
|
|
|
33
|
$self->encoding =~ /utf-?8/ ? 1 : 0; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub HTTP::MobileAgent::encoding { |
13
|
16
|
|
|
16
|
0
|
44
|
my $self = shift; |
14
|
16
|
100
|
|
|
|
46
|
if ($self->is_non_mobile) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
15
|
2
|
|
|
|
|
19
|
return 'utf-8'; |
16
|
|
|
|
|
|
|
} elsif ($self->is_airh_phone) { |
17
|
2
|
|
|
|
|
22
|
return 'x-sjis-airh'; |
18
|
|
|
|
|
|
|
} elsif ($self->is_ezweb) { |
19
|
|
|
|
|
|
|
# ezweb canot display utf8 in https. |
20
|
4
|
|
|
|
|
43
|
return 'x-sjis-ezweb-auto'; |
21
|
|
|
|
|
|
|
} elsif ($self->is_vodafone) { |
22
|
4
|
100
|
|
|
|
60
|
if ($self->is_type_3gc) { |
23
|
2
|
|
|
|
|
17
|
return 'x-utf8-vodafone'; |
24
|
|
|
|
|
|
|
} else { |
25
|
2
|
|
|
|
|
14
|
return 'x-sjis-vodafone'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} else { |
28
|
4
|
100
|
|
|
|
61
|
my $charset = $self->xhtml_compliant ? 'utf8' : 'sjis'; |
29
|
4
|
|
|
|
|
19
|
return join '-', 'x', $charset, lc($self->carrier_longname); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |