Subject: | client did not set the encoding of the soap-envelope to 'iso-8859-1' in HTTP-request |
Hi all,
first of all, thanks for SOAP::Lite, it will become very useful for me :-)
I had problems sending HTTP-request in encodings other than UTF-8. The
solution at
http://cookbook.soaplite.com/#internationalization%20and%20encoding
looks pretty easy, but if I set encoding('iso-8859-1') the only thing
changed was the charset in the HTTP header (Content-Type: text/xml;
charset=iso-8859-1) and the value of the encoding in the <?xml?> tag
(<?xml version="1.0" encoding="iso-8859-1"?>). The content of the
soap-envelope was still in UTF-8 encoding.
Now I figured out that the problem might be in SOAP::Transport::HTTP
(sub send_receive).
Actually line 205 of SOAP::Transport::HTTP (version 0.714) looks like that:
$envelope = Encode::encode('UTF-8', $envelope);
after changing this line to:
$envelope = Encode::encode($encoding, $envelope);
the content of the soap-envelop was encoded to iso-8859-1.
This is fine for me, but I don't really know if it was the right place
to fix the problem.
greetings,
fingera
SOAP-Lite-0.714
perl 5.10.0 (and 5.10.1)