Changeset 4830 for lang/perl/Encode-JP-Mobile/trunk
- Timestamp:
- 01/18/08 03:07:22 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Encode-JP-Mobile/trunk/t/emoji_convert_utf8.t
r4827 r4830 11 11 simple_pair(docomo => "\xee\x98\xbe", kddi => "\xee\xbd\xa6", softbank => "\xee\x81\x8a"); # KDDI-Auto 12 12 13 sub _h { 14 # for better Test::More log 15 my $bytes = shift; 16 my $out = unpack "H*", $bytes; 17 $out =~ s/(..)/\\x$1/g; 18 $out; 19 } 20 13 21 sub simple_pair { 14 22 my(%bytes) = @_; … … 20 28 my $char = decode("x-utf8-" . $from, $bytes{$from}); 21 29 my $hex = sprintf '%X', ord $char; 22 is encode("x-utf8-" . $to, $char), $bytes{$to}, "$from -> $to (U+$hex)";30 is _h(encode("x-utf8-" . $to, $char)), _h($bytes{$to}), "$from -> $to (U+$hex)"; 23 31 } 24 32 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)