Changeset 1608 for lang/perl/Encode-JP-Mobile/branches
- Timestamp:
- 11/16/07 08:28:37 (6 years ago)
- Location:
- lang/perl/Encode-JP-Mobile/branches/feature-convert-pictogram
- Files:
-
- 3 modified
-
lib/Encode/JP/Mobile.pm (modified) (2 diffs)
-
lib/Encode/JP/Mobile/UTF8.pm (modified) (3 diffs)
-
t/emoji_convert_utf8_fb.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Encode-JP-Mobile/branches/feature-convert-pictogram/lib/Encode/JP/Mobile.pm
r1560 r1608 8 8 use base qw( Exporter ); 9 9 BEGIN { 10 @EXPORT_OK = qw( InDoCoMoPictograms InKDDIPictograms InSoftBankPictograms InAirEdgePictograms );10 @EXPORT_OK = qw( InDoCoMoPictograms InKDDIPictograms InSoftBankPictograms InAirEdgePictograms InMobileJPPictograms ); 11 11 %EXPORT_TAGS = ( props => [@EXPORT_OK] ); 12 12 } … … 80 80 } 81 81 82 sub InMobileJPPictograms { 83 return <<'END'; 84 +Encode::JP::Mobile::InDoCoMoPictograms 85 +Encode::JP::Mobile::InKDDIPictograms 86 +Encode::JP::Mobile::InSoftBankPictograms 87 +Encode::JP::Mobile::InAirEdgePictograms 88 END 89 } 90 82 91 1; 83 92 __END__ -
lang/perl/Encode-JP-Mobile/branches/feature-convert-pictogram/lib/Encode/JP/Mobile/UTF8.pm
r1560 r1608 2 2 use strict; 3 3 use warnings; 4 use Encode::JP::Mobile ':props';5 4 use Encode::Alias; 6 5 … … 29 28 my $code = chr shift; 30 29 31 if ( $check && $code =~ /\p{ InDoCoMoPictograms}|\p{InSoftBankPictograms}|\p{InKDDIPictograms}|\p{InAirEdgePictograms}/ ) {30 if ( $check && $code =~ /\p{Encode::JP::Mobile::InMobileJPPictograms}/ ) { 32 31 Encode::encode( "x-utf8-${carrier}-pictogram", $code, $check ); 33 32 } … … 42 41 43 42 1; 43 __END__ 44 45 =head1 NAME 46 47 Encode::JP::Mobile::UTF8 - Pictogram characters conversion based on UTF-8 48 49 =head1 SYNOPSIS 50 51 use Encode::JP::Mobile; 52 53 # KDDI sunny mark post-ed from charset=utf-8 page. 54 my $text = "\xEE\xBD\xA0"; 55 $text = decode('utf-8', $text); 56 57 print encode('x-utf8-docomo', $text); # DoCoMo sunny mark (\xEE\x98\xBE) 58 print encode('x-utf8-softbank', $text); # Softbank sunny mark (\xEE\x81\x8A) 59 60 # Softbank sunny mark and "It's here" mark post-ed from charset=utf-8 page. 61 # KDDI doesn't have the mark corresponding to "It's here". 62 my $text = "\xEE\x81\x8A\xEE\x90\xA8"; 63 print encode('x-utf8-kddi', $text, sub { '〓' }); # "It's here" to "GETA" 64 65 =head1 AUTHOR 66 67 Naoki Tomita, Tokuhiro Matsuno 68 69 =head1 SEE ALSO 70 71 L<Encode::JP::Mobile> 72 -
lang/perl/Encode-JP-Mobile/branches/feature-convert-pictogram/t/emoji_convert_utf8_fb.t
r1553 r1608 5 5 use Encode qw(:fallback_all); 6 6 7 plan tests => 3 ;7 plan tests => 3 + 2; 8 8 9 9 is encode('x-utf8-kddi', "\x{E652}", FB_XMLCREF), '', 'xmlcref fallback kddi'; … … 11 11 is encode('x-utf8-docomo', "\x{E538}", FB_XMLCREF), '', 'xmlcref fallback docomo'; 12 12 13 is encode('x-utf8-kddi', "\x{E04A}\x{E428}", sub { sprintf '<%X>', shift }), "\xEE\xBD\xA0<E428>"; 14 is encode('x-utf8-kddi', "\x{E04A}\x{E428}", sub { '〓' }), "\xEE\xBD\xA0〓";
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)