http://www.perlmonks.org?node_id=11106138

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Simple question but I can't figure it out.
I want to send iso-8858-5 to a Soap service, but Soap::Lite client defaults to utf8.
How do I change that?

Replies are listed 'Best First'.
Re: Soap::Lite set charset
by poj (Abbot) on Sep 13, 2019 at 20:50 UTC

    Not sure what you mean but try

    $client->encoding('iso-8858-5');
    poj
      The client sends by default "Content-Type: text/xml; charset=utf-8"
      But what if my charset is iso and not utf? Would the server interpret the characters correctly?
      I can't find any instructions on how to chanhe that!
Re: Soap::Lite set charset
by choroba (Cardinal) on Sep 16, 2019 at 11:08 UTC
    Are you sure it's iso-8858-5?
    $ perl -MEncode -wE 'say encode("iso-8858-5", "abc")' Unknown encoding 'iso-8858-5' at -e line 1.

    Maybe you need iso-8859-5?

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: Soap::Lite set charset
by Anonymous Monk on Sep 13, 2019 at 19:09 UTC
    What?