From: fbriere Date: Fri, 17 Feb 2006 03:49:14 +0000 (+0000) Subject: IS cannot support UTF-8 properly X-Git-Tag: V0_01~22 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment-InternetSecure.git;a=commitdiff_plain;h=7f30025e73ae69403e8fe0ffd922f5bb4feada11 IS cannot support UTF-8 properly --- diff --git a/InternetSecure.pm b/InternetSecure.pm index f4e68da..0029e91 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -217,7 +217,7 @@ sub to_xml { NumericEscape => 2, RootName => 'TranxRequest', SuppressEmpty => undef, - XMLDecl => '', + XMLDecl => '', ); } @@ -296,6 +296,9 @@ sub submit { 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); }