common/tools/raptor/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm
changeset 923 5ccf9d5ab663
parent 922 996297fad800
parent 907 bab81256b297
child 924 a5ed0e6ca679
equal deleted inserted replaced
922:996297fad800 923:5ccf9d5ab663
     1 # $Id: NoUnicodeExt.pm,v 1.3 2003/07/30 13:39:23 matt Exp $
       
     2 
       
     3 package XML::SAX::PurePerl::Reader;
       
     4 use strict;
       
     5 
       
     6 sub set_raw_stream {
       
     7     # no-op
       
     8 }
       
     9 
       
    10 sub switch_encoding_stream {
       
    11     my ($fh, $encoding) = @_;
       
    12     throw XML::SAX::Exception::Parse (
       
    13         Message => "Only ASCII encoding allowed without perl 5.7.2 or higher. You tried: $encoding",
       
    14     ) if $encoding !~ /(ASCII|UTF\-?8)/i;
       
    15 }
       
    16 
       
    17 sub switch_encoding_string {
       
    18     my (undef, $encoding) = @_;
       
    19     throw XML::SAX::Exception::Parse (
       
    20         Message => "Only ASCII encoding allowed without perl 5.7.2 or higher. You tried: $encoding",
       
    21     ) if $encoding !~ /(ASCII|UTF\-?8)/i;
       
    22 }
       
    23 
       
    24 1;
       
    25