Changeset 6292 for lang/perl/HTTP-MobileAgent-Plugin-Charset
- Timestamp:
- 02/06/08 18:52:59 (5 years ago)
- Location:
- lang/perl/HTTP-MobileAgent-Plugin-Charset/branches/au_ssl
- Files:
-
- 2 modified
-
lib/HTTP/MobileAgent/Plugin/Charset.pm (modified) (1 diff)
-
t/01_can_display_utf8.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-MobileAgent-Plugin-Charset/branches/au_ssl/lib/HTTP/MobileAgent/Plugin/Charset.pm
r6145 r6292 17 17 return 'x-sjis-airh'; 18 18 } elsif ($self->is_ezweb) { 19 # ezweb canot display utf8 in https. 20 return 'x-sjis-ezweb-auto'; 19 if ($self->xhtml_compliant && $self->get_header('Accept-Charset') =~ /\*/) { 20 return 'x-utf8-ezweb'; 21 } else { 22 # ezweb canot display utf8 in https. 23 return 'x-sjis-ezweb-auto'; 24 } 21 25 } elsif ($self->is_vodafone) { 22 26 if ($self->is_type_3gc) { -
lang/perl/HTTP-MobileAgent-Plugin-Charset/branches/au_ssl/t/01_can_display_utf8.t
r5277 r6292 4 4 use HTTP::MobileAgent; 5 5 use HTTP::MobileAgent::Plugin::Charset; 6 7 6 plan tests => 1*blocks; 8 7 9 8 filters { 10 input => [qw/ filt/],9 input => [qw/trim lines chomp filt/], 11 10 expected => [qw/yaml/], 12 11 }; … … 15 14 16 15 sub filt { 17 my $ua = shift;16 my ($ua, $accept_charset) = @_; 18 17 19 local $ENV{HTTP_USER_AGENT} = $ua; 18 local $ENV{HTTP_USER_AGENT} = $ua; 19 local $ENV{HTTP_ACCEPT_CHARSET} = $accept_charset if $accept_charset; 20 20 21 21 my $agent = HTTP::MobileAgent->new; … … 70 70 encoding: x-sjis-ezweb-auto 71 71 72 === ez utf8 73 --- input: KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1 72 === ez utf8 non-SSL 73 --- input 74 KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1 75 shift_jis,* 76 --- expected 77 can_display_utf8: utf8 78 encoding: x-utf8-ezweb 79 80 === ez utf8 SSL 81 --- input 82 KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1 83 shift_jis 74 84 --- expected 75 85 can_display_utf8: no utf8
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)