Skip Menu |

This queue is for tickets about the SOAP-Lite CPAN distribution.

Report information
The Basics
Id: 73802
Status: resolved
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: Achim.Finger [...] t-online.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.714
Fixed in: (no value)



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)
Hi Achim, Show quoted text
> first of all, thanks for SOAP::Lite, it will become very useful for
me :-) thanks. Show quoted text
> 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.
This sounds like a bug. Show quoted text
> 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: Show quoted text
> > $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.
Your proposed resolutions sounds fine - I'll apply to SVN, test, and if nothing breaks it'll make it in the next relase. Show quoted text
> greetings, > fingera
Thanks, Martin
fixed in SVN in rev 403 Thanks, Martin
Fixed in 0.715 just uploaded to CPAN