Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

How to convince SOAP::Lite to return UTF-8 data in responses as UTF-8?

by mithaldu (Monk)
on Feb 20, 2012 at 17:21 UTC ( #955106=perlquestion: print w/ replies, xml ) Need Help??
mithaldu has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to transmit UTF-8 strings in complex data structures with SOAP::Lite. However, as it turns out, SOAP::Lite quietly converts all UTF-8 strings into base-64-encoded octets. The problem with that is that the deserializing does not revert the conversion and only does a straight base64 decode.

This leaves me confused as to how a user is supposed to ensure that they get UTF-8 data from the SOAP::Lite response. Walking the tree and running `decode_utf8` on all strings seems wasteful.

Any suggestions?

Edit: In a nutshell, how do i make this test pass without monkey-patching?

Comment on How to convince SOAP::Lite to return UTF-8 data in responses as UTF-8?
Re: How to convince SOAP::Lite to return UTF-8 data in responses as UTF-8?
by Khen1950fx (Canon) on Feb 20, 2012 at 19:33 UTC
    You can turn off base64 encoding:
    my $string = SOAP::Data->type( string => 'UTF-8' );
      That helps with single strings, but when you have a complex data structure i'd still need to walk the entire tree to mark all of the strings.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://955106]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-07-31 02:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls