Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / XML / SAX / PurePerl / Reader / UnicodeExt.pm
1 # $Id: UnicodeExt.pm,v 1.5 2008-08-04 10:04:54 grant Exp $
2
3 package XML::SAX::PurePerl::Reader;
4 use strict;
5
6 use Encode ();
7
8 sub set_raw_stream {
9     my ($fh) = @_;
10     binmode($fh, ":bytes");
11 }
12
13 sub switch_encoding_stream {
14     my ($fh, $encoding) = @_;
15     binmode($fh, ":encoding($encoding)");
16 }
17
18 sub switch_encoding_string {
19     $_[0] = Encode::decode($_[1], $_[0]);
20 }
21
22 1;
23