xml xsl and accented characters

Discussion in 'Perl Misc' started by KaliKo, Jun 2, 2005.

  1. KaliKo

    KaliKo Guest

    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">
    <xsl:eek:utput 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.
    KaliKo, Jun 2, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mickey Segal

    Text search with accented characters

    Mickey Segal, Dec 15, 2005, in forum: Java
    Replies:
    3
    Views:
    757
    Roedy Green
    Dec 16, 2005
  2. Davide Benini

    accented characters

    Davide Benini, Jun 1, 2005, in forum: XML
    Replies:
    4
    Views:
    798
    David Carlisle
    Jun 1, 2005
  3. Mark Drummond

    Dealing with accented characters

    Mark Drummond, May 31, 2006, in forum: Perl
    Replies:
    0
    Views:
    2,910
    Mark Drummond
    May 31, 2006
  4. Stephen Boulet
    Replies:
    3
    Views:
    387
    Terry Reedy
    Jul 16, 2004
  5. Anna Kavan
    Replies:
    0
    Views:
    383
    Anna Kavan
    Oct 31, 2006
Loading...

Share This Page