Duh. If the input is a stream of UTF-8 bytes, all that's
[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: 1.0 $ =~ /\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 if (ord('A') == 65){
13     Encode::define_alias( 'Unicode' => 'Internal' );
14 }
15
16 sub decode
17 {
18     my ($obj,$str,$chk) = @_;
19   utf8::upgrade($str);
20     $_[1] = '' if $chk;
21     return $str;
22 }
23
24 *encode = \&decode;
25 1;
26 __END__
27
28 =head1 NAME
29
30 Encode::Internal -- for internal use only
31
32 =cut