1 package Encode::Encoding;
2 # Base class for classes which implement encodings
5 do {my @r=(q$Revision: 0.30 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r};
10 my $canonical = shift;
11 $obj = bless { Name => $canonical },$obj unless ref $obj;
12 # warn "$canonical => $obj\n";
13 Encode::define_encoding($obj, $canonical, @_);
16 sub name { shift->{'Name'} }
18 # Temporary legacy methods
19 sub toUnicode { shift->decode(@_) }
20 sub fromUnicode { shift->encode(@_) }
22 sub new_sequence { return $_[0] }