K
KaliKo
Hello,
I can´t view the accented characters in my html output, and I'm trying
a thousand of things but no luck!
Look at my code:
perl p.pl p.xsl p.xml
p.pl:
use XML::XSLT;
$xsl = @ARGV[0];
$xmlfile = @ARGV[1];
my $xslt = XML::XSLT->new (Source => $xsl, warnings => 1);
$xslt->transform ($xmlfile);
print "Content-Type:text/html; charset=ISO-8859-1\n\n";
print $xslt->toString;
$xslt->dispose();
p.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" encoding="ISO-8859-1"
disable-output-escaping="yes"/>
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"></meta>
<title>A text with acc chars</title>
</head>
<body>
....
....
....
p.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>á é í ó ú</root>
the output:
Content-Type:text/html; charset=ISO-8859-1
<html><head><meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"/><title>A text with acc
chars</title></head><body>á é à ó ú</body></html>
Any ideas?
Thanks.
I can´t view the accented characters in my html output, and I'm trying
a thousand of things but no luck!
Look at my code:
perl p.pl p.xsl p.xml
p.pl:
use XML::XSLT;
$xsl = @ARGV[0];
$xmlfile = @ARGV[1];
my $xslt = XML::XSLT->new (Source => $xsl, warnings => 1);
$xslt->transform ($xmlfile);
print "Content-Type:text/html; charset=ISO-8859-1\n\n";
print $xslt->toString;
$xslt->dispose();
p.xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html" encoding="ISO-8859-1"
disable-output-escaping="yes"/>
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"></meta>
<title>A text with acc chars</title>
</head>
<body>
....
....
....
p.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>á é í ó ú</root>
the output:
Content-Type:text/html; charset=ISO-8859-1
<html><head><meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"/><title>A text with acc
chars</title></head><body>á é à ó ú</body></html>
Any ideas?
Thanks.