IS cannot support UTF-8 properly
authorfbriere <fbriere>
Fri, 17 Feb 2006 03:49:14 +0000 (03:49 +0000)
committerfbriere <fbriere>
Fri, 17 Feb 2006 03:49:14 +0000 (03:49 +0000)
InternetSecure.pm

index f4e68da..0029e91 100755 (executable)
@@ -217,7 +217,7 @@ sub to_xml {
                NumericEscape   => 2,
                RootName        => 'TranxRequest',
                SuppressEmpty   => undef,
                NumericEscape   => 2,
                RootName        => 'TranxRequest',
                SuppressEmpty   => undef,
-               XMLDecl         => '<?xml version="1.0" encoding="utf-8" standalone="yes"?>',
+               XMLDecl         => '<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>',
        );
 }
 
        );
 }
 
@@ -296,6 +296,9 @@ sub submit {
        croak 'Error connecting to server' unless $page;
        croak 'Server responded, but not in XML' unless $page =~ /^<\?xml/;
 
        croak 'Error connecting to server' unless $page;
        croak 'Server responded, but not in XML' unless $page =~ /^<\?xml/;
 
+       # The response is marked UTF-8, but it's really Latin-1.  Sigh.
+       $page =~ s/^(<\?xml.*?) encoding="utf-8"/$1 encoding="iso-8859-1"/si;
+
        $self->parse_response($page);
 }
 
        $self->parse_response($page);
 }