Changeset 10024

Show
Ignore:
Timestamp:
04/21/08 00:09:25 (5 years ago)
Author:
tokuhirom
Message:

docomo は 10 進数実体参照sjis OK.

Location:
lang/perl/HTML-ReplacePictogramMobileJp/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HTML-ReplacePictogramMobileJp/trunk/lib/HTML/ReplacePictogramMobileJp/DoCoMo.pm

    r4899 r10024  
    33use warnings; 
    44use HTML::ReplacePictogramMobileJp::Base; 
     5use Encode; 
    56 
    67filter utf8 => 'x-utf8-docomo', sub { 
     
    1213    unicode_property 'I'; 
    1314    unicode_hex_cref 'I'; 
     15 
     16    s/&#([0-9]+);/ 
     17        my $original = $1; 
     18        my $x = unpack 'U*', decode 'x-sjis-imode', pack 'H*', sprintf '%x', $original; 
     19        callback($x, 'I') 
     20    /gei; 
    1421}; 
    1522 
  • lang/perl/HTML-ReplacePictogramMobileJp/trunk/t/01_simple.t

    r4996 r10024  
    11use strict; 
    22use warnings; 
    3 use Test::More tests => 16; 
     3use Test::More tests => 17; 
    44use HTML::ReplacePictogramMobileJp; 
    55use Encode; 
     
    99is _x('I', 'sjis', encode('x-sjis-docomo', "\x{E757}")), "<U+E757> I"; 
    1010is _x('I', 'sjis', "&#xE757;"), "<U+E757> I"; 
     11is _x('I', 'sjis', "&#63647;"), "<U+E63E> I"; 
    1112 
    1213is _x('E', 'utf8', encode('x-utf8-ezweb', "\x{ED80}")), "<U+ED80> E";