Subject: | Unicode issue when using $c->stash->{soap}->compile_return(...) |
Date: | Tue, 07 Apr 2009 11:59:14 +0200 |
To: | bug-Catalyst-Controller-SOAP [...] rt.cpan.org |
From: | kmx <kmx [...] volny.cz> |
Hi,
I have deal with some problems when trying to generate some utf-8
strings into SOAp response.
My code was very similar to the basic example:
http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-1.11/lib/Catalyst/Controller/SOAP.pm#USING_WSDL
The problem (server fails to generate response at all) occures when I
want to do the following:
$c->stash->{soap}->compile_return({ greeting => 'some utf8 string!' });
I have done a dirty hack into Catalyst/Controller/SOAP.pm
[line 375] $c->res->content_type('text/xml;charset=UTF-8');
[line 376] $c->res->body(encode('utf8',$envelope->toString()));
I am not sure if this is the right solution; however I would appreciate
if it could be solved in the module distribution.
--
kmx