diff options
author | fbriere <fbriere> | 2006-02-17 03:49:14 +0000 |
---|---|---|
committer | fbriere <fbriere> | 2006-02-17 03:49:14 +0000 |
commit | 7f30025e73ae69403e8fe0ffd922f5bb4feada11 (patch) | |
tree | e16258d422f1ec12d233a04e3d50fd31e5dabc0e /InternetSecure.pm | |
parent | ba6f01061a4f1643c9683238227af9196857537e (diff) |
IS cannot support UTF-8 properly
Diffstat (limited to 'InternetSecure.pm')
-rwxr-xr-x | InternetSecure.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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 => '<?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/; + # 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); } |