summaryrefslogtreecommitdiff
path: root/ext/Encode/lib/Encode/Internal.pm
blob: e9103d5f4f01c92a87f9089cebcd5400b5f696b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package Encode::Internal;
use strict;
our $VERSION = do { my @r = (q$Revision: 1.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };

use base 'Encode::Encoding';

# Dummy package that provides the encode interface but leaves data
# as UTF-X encoded. It is here so that from_to() works.

__PACKAGE__->Define('Internal');

if (ord('A') == 65){
    Encode::define_alias( 'Unicode' => 'Internal' );
}

sub decode
{
    my ($obj,$str,$chk) = @_;
  utf8::upgrade($str);
    $_[1] = '' if $chk;
    return $str;
}

*encode = \&decode;
1;
__END__

=head1 NAME

Encode::Internal -- for internal use only

=cut