Changeset 1738 for lang/perl/Encode-JP-Mobile/tags/0.09
- Timestamp:
- 11/18/07 07:51:04 (6 years ago)
- Location:
- lang/perl/Encode-JP-Mobile/tags/0.09
- Files:
-
- 8 modified
-
MANIFEST (modified) (1 diff)
-
MANIFEST.SKIP (modified) (1 diff)
-
Makefile.PL (modified) (1 diff)
-
lib/Encode/JP/Mobile.pm (modified) (1 diff)
-
lib/Encode/JP/Mobile/Vodafone.pm (modified) (2 diffs)
-
t/Mobile.t (modified) (1 diff)
-
t/emoji_convert.t (modified) (1 diff)
-
t/vodafone-fallback.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Encode-JP-Mobile/tags/0.09/MANIFEST
r1737 r1738 8 8 t/kddi-trans.t 9 9 t/Mobile.t 10 t/softbank-dat.yaml11 t/softbank-regress.t12 10 t/vodafone-fallback.t 13 11 ucm/x-sjis-imode.ucm -
lang/perl/Encode-JP-Mobile/tags/0.09/MANIFEST.SKIP
r1737 r1738 13 13 \.fnm$ 14 14 \.shipit$ 15 \.bs$ 16 \.c$ 17 \.o$ 18 \.exh$ 19 \.h$ -
lang/perl/Encode-JP-Mobile/tags/0.09/Makefile.PL
r1737 r1738 14 14 15 15 my %tables = ( 16 Mobile_t => [ 'ucm/ shift_jis-airedge.ucm','ucm/shift_jis-imode.ucm','ucm/shift_jis-kddi.ucm' ],16 Mobile_t => [ 'ucm/x-sjis-imode.ucm','ucm/x-sjis-kddi.ucm','ucm/x-sjis-kddi-auto.ucm' ], 17 17 ); 18 18 -
lang/perl/Encode-JP-Mobile/tags/0.09/lib/Encode/JP/Mobile.pm
r1737 r1738 129 129 =head1 SEE ALSO 130 130 131 L<Encode>, L<HTML::Entities::ImodePictogram> , L<Unicode::Japanese>131 L<Encode>, L<HTML::Entities::ImodePictogram> 132 132 133 http://www.nttdocomo.co.jp/service/imode/make/content/pictograph/basic/ 134 http://www.nttdocomo.co.jp/service/imode/make/content/pictograph/extention/ 133 http://www.nttdocomo.co.jp/p_s/imode/make/emoji/ 135 134 http://www.au.kddi.com/ezfactory/tec/spec/3.html 136 http://developers.softbankmobile.co.jp/dp/tool_dl/web/picword_top.php 137 http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/homepage/index.html 138 http://www.nttdocomo.co.jp/service/mail/imode_mail/emoji_convert/ 135 http://developers.vodafone.jp/dp/tool_dl/web/picword_top.php 136 http://www.willcom-inc.com/p_s/products/airh_phone/homepage.html 139 137 140 138 =cut -
lang/perl/Encode-JP-Mobile/tags/0.09/lib/Encode/JP/Mobile/Vodafone.pm
r1737 r1738 21 21 sub decode($$;$) { 22 22 my($self, $char, $check) = @_; 23 my $str = Encode::decode(" cp932", $char, Encode::FB_PERLQQ);23 my $str = Encode::decode("shift_jis", $char, Encode::FB_PERLQQ); 24 24 $str =~ s{\x1b\x24([GEFOPQ])([\x20-\x7F]+)\x0f}{ 25 25 join '', map chr($HighCharToBit{$1} | ord($_) - 32), split //, $2; … … 36 36 my $m = $in ? $1 : $2; 37 37 $res .= $in ? _encode_vodafone($m) 38 : Encode::encode(" cp932", $m, $check);38 : Encode::encode("shift_jis", $m, $check); 39 39 '' 40 40 }egs; -
lang/perl/Encode-JP-Mobile/tags/0.09/t/Mobile.t
r1737 r1738 1 1 use strict; 2 use Test::More tests => 18;2 use Test::More tests => 44; 3 3 4 4 use_ok('Encode'); 5 5 use_ok('Encode::JP::Mobile'); 6 6 7 test_rt("x-sjis-imode", "\x82\xb1\xf9\x5d\xf8\xa0\x82\xb1", "\x{3053}\x{e6b9}\x{e63f}\x{3053}"); 8 test_rt("x-sjis-docomo", "\x82\xb1\xf9\x5d\xf8\xa0\x82\xb1", "\x{3053}\x{e6b9}\x{e63f}\x{3053}"); 9 test_rt("x-sjis-kddi", "\x82\xb1\xF6\x59", "\x{3053}\x{e481}"); 10 test_rt("x-sjis-kddi-auto", "\x82\xb1\xF6\x59", "\x{3053}\x{ef59}"); 11 test_rt("x-sjis-ezweb", "\x82\xb1\xF6\x59", "\x{3053}\x{e481}"); 12 test_rt("x-sjis-airedge", "\x82\xb1\xF0\x40", "\x{3053}\x{e000}"); 13 test_rt("x-sjis-airh", "\x82\xb1\xF0\x40", "\x{3053}\x{e000}"); 14 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x47\x21\x22\x0f", "\x{3053}\x{e001}\x{e002}"); 15 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x47\x21\x22\x0f", "\x{3053}\x{e001}\x{e002}"); 16 17 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x45\x21\x22\x0f", "\x{3053}\x{e101}\x{e102}"); 18 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x45\x21\x22\x0f", "\x{3053}\x{e101}\x{e102}"); 19 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x46\x21\x22\x0f", "\x{3053}\x{e201}\x{e202}"); 20 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x46\x21\x22\x0f", "\x{3053}\x{e201}\x{e202}"); 21 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x4f\x21\x22\x0f", "\x{3053}\x{e301}\x{e302}"); 22 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x4f\x21\x22\x0f", "\x{3053}\x{e301}\x{e302}"); 23 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x50\x21\x22\x0f", "\x{3053}\x{e401}\x{e402}"); 24 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x50\x21\x22\x0f", "\x{3053}\x{e401}\x{e402}"); 25 test_rt("x-sjis-vodafone", "\x82\xb1\x1b\x24\x51\x21\x22\x0f", "\x{3053}\x{e501}\x{e502}"); 26 test_rt("x-sjis-softbank", "\x82\xb1\x1b\x24\x51\x21\x22\x0f", "\x{3053}\x{e501}\x{e502}"); 27 7 28 test_rt("shift_jis-imode", "\x82\xb1\xf9\x5d\xf8\xa0\x82\xb1", "\x{3053}\x{e6b9}\x{e63f}\x{3053}"); 8 test_rt("shift_jis-docomo", "\x82\xb1\xf9\x5d\xf8\xa0\x82\xb1", "\x{3053}\x{e6b9}\x{e63f}\x{3053}");9 test_rt("shift_jis-kddi", "\x82\xb1\xF6\x59", "\x{3053}\x{e481}");10 test_rt("shift_jis-ezweb", "\x82\xb1\xF6\x59", "\x{3053}\x{e481}");11 test_rt("shift_jis-airedge", "\x82\xb1\xF0\x40", "\x{3053}\x{e000}");12 test_rt("shift_jis-airh", "\x82\xb1\xF0\x40", "\x{3053}\x{e000}");13 29 test_rt("shift_jis-vodafone", "\x82\xb1\x1b\x24\x47\x21\x22\x0f", "\x{3053}\x{e001}\x{e002}"); 14 test_rt("shift_jis-softbank", "\x82\xb1\x1b\x24\x47\x21\x22\x0f", "\x{3053}\x{e001}\x{e002}");15 30 16 31 sub test_rt { -
lang/perl/Encode-JP-Mobile/tags/0.09/t/emoji_convert.t
r1737 r1738 12 12 13 13 for my $pict (@map) { 14 is encode(' shift_jis-ezweb', decode('shift_jis-imode', $pict->{imode}))14 is encode('x-sjis-ezweb', decode('x-sjis-imode', $pict->{imode})) 15 15 => $pict->{ezweb}, 16 16 "imode => ezweb ($pict->{name})"; 17 18 is encode(' shift_jis-imode', decode('shift_jis-imode', $pict->{imode}))17 18 is encode('x-sjis-imode', decode('x-sjis-imode', $pict->{imode})) 19 19 => $pict->{imode}, 20 20 "imode => imode ($pict->{name})"; 21 22 is encode(' shift_jis-imode', decode('shift_jis-ezweb', $pict->{ezweb}))21 22 is encode('x-sjis-imode', decode('x-sjis-ezweb', $pict->{ezweb})) 23 23 => $pict->{imode}, 24 24 "ezweb => imode ($pict->{name})"; 25 26 is encode(' shift_jis-ezweb', decode('shift_jis-ezweb', $pict->{ezweb}))25 26 is encode('x-sjis-ezweb', decode('x-sjis-ezweb', $pict->{ezweb})) 27 27 => $pict->{ezweb}, 28 28 "ezweb => ezweb ($pict->{name})"; -
lang/perl/Encode-JP-Mobile/tags/0.09/t/vodafone-fallback.t
r1737 r1738 7 7 { 8 8 my $u = "\x{0647}"; 9 is encode(" shift_jis-vodafone", $u, Encode::FB_HTMLCREF), "ه";9 is encode("x-sjis-vodafone", $u, Encode::FB_HTMLCREF), "ه"; 10 10 } 11 11 12 12 { 13 13 my $u = "\x{0647}"; 14 my $var = encode(" shift_jis-vodafone", $u, sub { "x" . $_[0] });14 my $var = encode("x-sjis-vodafone", $u, sub { "x" . $_[0] }); 15 15 is $var, "x1607"; 16 16 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)