Show
Ignore:
Timestamp:
01/17/08 16:42:14 (6 years ago)
Author:
tokuhirom
Message:

lang/perl/autobox-Encode: added from_to support

Location:
lang/perl/autobox-Encode/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/autobox-Encode/trunk/lib/autobox/Encode.pm

    r3559 r4777  
    1111sub decode { Encode::decode($_[1], $_[0], $_[2]) } 
    1212sub is_utf8 { Encode::is_utf8($_[0]) } 
     13sub from_to { Encode::from_to($_[0], $_[1], $_[2]); $_[0] } 
    1314 
    14151; 
  • lang/perl/autobox-Encode/trunk/t/01_simple.t

    r3559 r4777  
    44use autobox::Encode; 
    55use Encode (); 
    6 use Test::More tests => 6; 
     6use Test::More tests => 7; 
    77 
    88ok Encode::is_utf8('あいうえお'->decode('utf-8')); 
     
    1313ok not 'あいうえお'->is_utf8; 
    1414 
     15my $x = 'あいうえお'; 
     16is uc(unpack "H*", $x->from_to('utf-8' => 'euc-jp')), "A4A2A4A4A4A6A4A8A4AA";