Upgrade to Encode 0.93, from Dan Kogai.
[p5sagit/p5-mst-13.2.git] / ext / Encode / lib / Encode / Internal.pm
1 package Encode::Internal;
2 use strict;
3 our $VERSION = do { my @r = (q$Revision: 0.92 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
4
5 use base 'Encode::Encoding';
6
7 # Dummy package that provides the encode interface but leaves data
8 # as UTF-X encoded. It is here so that from_to() works.
9
10 __PACKAGE__->Define('Internal');
11
12 Encode::define_alias( 'Unicode' => 'Internal' ) if ord('A') == 65;
13
14 sub decode
15 {
16     my ($obj,$str,$chk) = @_;
17   utf8::upgrade($str);
18     $_[1] = '' if $chk;
19     return $str;
20 }
21
22 *encode = \&decode;
23 1;
24 __END__