Changeset 5396
- Timestamp:
- 01/24/08 12:59:51 (5 years ago)
- Location:
- lang/perl/HTML-Entities-ConvertPictogramMobileJp/trunk
- Files:
-
- 2 modified
-
lib/HTML/Entities/ConvertPictogramMobileJp.pm (modified) (3 diffs)
-
t/01_simple.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTML-Entities-ConvertPictogramMobileJp/trunk/lib/HTML/Entities/ConvertPictogramMobileJp.pm
r5341 r5396 2 2 use strict; 3 3 use warnings; 4 our $VERSION = '0.0 1';4 our $VERSION = '0.02'; 5 5 use Encode; 6 6 use Encode::JP::Mobile; … … 22 22 _convert_unicode('softbank', $2) 23 23 } elsif ($agent->is_ezweb) { 24 sprintf '&#x%X;', unpack 'U*', decode "x-sjis-kddi-cp932-raw", encode( "x-sjis-kddi-auto", chr( hex $2 )); 24 join '', map { sprintf( '&#x%X;', unpack( 'U*', $_ ) ) } split //, 25 decode "x-sjis-kddi-cp932-raw", encode( "x-sjis-kddi-auto", chr( hex $2 ) ); 25 26 } elsif ($agent->is_docomo && $agent->is_foma) { 26 27 _convert_unicode('docomo', $2) … … 36 37 sub _convert_unicode { 37 38 my ($carrier, $unihex) = @_; 38 sprintf '&#x%X;', unpack 'U*', decode "x-utf8-$carrier", encode( "x-utf8-$carrier", chr( hex $unihex )); 39 join '', map { sprintf '&#x%X;', unpack 'U*', $_ } split //, 40 decode "x-utf8-$carrier", encode( "x-utf8-$carrier", chr( hex $unihex ) ); 39 41 } 40 42 -
lang/perl/HTML-Entities-ConvertPictogramMobileJp/trunk/t/01_simple.t
r5341 r5396 50 50 --- expected:  51 51 52 === i2e, pair 53 --- input 54 user_agent: KDDI-SA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0 55 html: "" 56 --- expected:  57 58 === i2v, pair 59 --- input 60 user_agent: Vodafone/1.0/V904SH/SHJ001/SN123456789012 Browser/VF-NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 61 html: "" 62 --- expected: 
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)