SOAP::Lite, encode and special characters

S

Stefan Braun

Hello,

I transmit German city names over SOAP::Lite to a webservice. If there is a
special character like "Ü" on the Server arrives a "Ã?".

In my code I define the encoding as: iso-8859-1:
$soap = SOAP::Lite
-> uri('http://services.uabo.tnw.ch/')
-> on_action( sub{ join '/', 'http://tnw.ch', $_[1]})
-> encoding('iso-8859-1')
-> proxy('http://services.uabo.tnw.ch/service.asmx');



I encode the variable too with iso-8859-1:
my $testcity = Encode::encode("iso-8859-1",$city);

the call is:
SOAP::Data->name(City => $testcity)->type('string')

If I start the equal script from the shell it works fine, on the webserver
it doesn't work.

I sniffed the traffic. If it works the "Ü" is transmitted as "dc" in oct, if
it doesn't work it's transmitted as "c3 9c".

What's my mistake?

Regards and many thanks

Stefan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top