[Catalyst] unconsistency
jmt
jmt at dxdydz.net
Fri Jul 27 17:12:26 GMT 2007
Hi,
I use Catalyst::View::XSLT, and I run into encoding problems :
My xml file is a standard UTF-8 file, and so is my style sheet.
Since Catalyst::View::XSLT is based on libxml2 (I am running Debian
GNU/Linux), I performed the following trials :
When I run
xsltproc <stylesheet> <xml file>
I get the correct output : correct encoding + expected result.
(correct behaviour is also obtained when using another transformed like
xalan-c)
When I test the same transformation using XML::LibXSLT, following strictly the
sysnopsis from perldoc XML::LibXSLT, encoding turns out to be Latin-1. If I
run the test like :
perl -CS test.pl
encoding is UTF-8 (correct)
(the -CS switch meaning as perldoc perlrun states : STDIN, STDOUT and STDERR
are UTF-8)
Finally, in Catalyst :
sub default : Private{
my ($self,$c)=@_;
$c->stash->{template}='stylesheet.xsl';
$c->stash->{xml}='index.xml';
}
sub end : ActionClass('RenderView'){}
the page return is in Latin-1, but every other pages are correctly encoded.
While other views (like TT) have always handled UTF-8 correctly, why is
XML::LibXSLT and consequently View::XSLT suddenly in the need of some switch
I can set for XML::LibXSLT but have no idea of where in Catalyst I can
perform the same (spurious) trick ?
jmt
--
--------------------------------------
Informatique technique et scientifique
http://www.dxdydz.net
Jean-Marie Thomas
mailto:jmt at dxdydz.net
+33 (0)3 88 32 93 64
+33 (0)6 37 18 86 63
More information about the Catalyst
mailing list