Commit | Line | Data |
df1df145 |
1 | package Encode::Internal; |
2 | use strict; |
ee981de6 |
3 | our $VERSION = do { my @r = (q$Revision: 0.90 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; |
4 | |
df1df145 |
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__ |