I am nearly gone nuts with this one. I am running AxKit 1.6.2 on Debian testing. I have a bunch of XML pages written in ISO-8859-1 encoding that get parsed by AxKit and transformed to HTML by means of XPathScript.
For the sake of simplicity, let's say that a page is like this one
<page>Questa � una pagina</page>
What happens is that if I do something like:
my $page = findvalue('/page/text()') ;
then $page is an UTF-8 string, so if I use a stylesheet like, say:
<html>
<% my $page = findvalue('/page/text()') ; %>
<head><title><%= $page %></title></head>
<body><h1><%= $page %></h1></body>
</html>the page will be correctly displayed.
Instead, if I use this stylesheet:
<html>
<% $t->{page}{pre} = '<h1>' ;
$t->{page}{post} = '</h1>' ; %>
<head><title>This page has no title</title></head>
<body><%= apply_templates() %></body>
</html>the page gets sent with these headers (note the Content-type one):
HTTP/1.1 200 OK Date: Mon, 03 Nov 2003 17:47:20 GMT Server: Apache/1.3.27 (Unix) Debian GNU/Linux AxKit/1.61 mod_perl/1.27 Last-Modified: Mon, 03 Nov 2003 17:41:54 GMT ETag: "ee455-6e-3fa69362" Accept-Ranges: bytes Content-Length: 110 Content-Type: text/html; charset=UTF-8
but page content is ISO-8859-1 actually:
<html>
<head><title>This page has no title</title></head> <body><h1>Questa ? una pagina</h1></body> </html>
This problem is making me go mad! Is there any way I could work around it?
Please help me if you can, it's months since I am fighting against these from time to time and I can't see where the problem is...
Ciao --Marco
-- Marco Marongiu Email: [EMAIL PROTECTED] System Administrator Phone: +39 070 460 1684 Tiscali S.p.A. Fax: +39 070 460 9684 International IT Services
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
