cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "FREDERIC MOSER" <frederic.mo...@eturs.u-strasbg.fr>
Subject Encoding problems
Date Mon, 02 Aug 2004 15:09:05 GMT
Hi,

I've got some encoding problems using the xhtml serializer, I don't
really understand .
(I use Mozilla on Win XP and my editor is set to use UTF-8)


Part 1:
-------

I've got the following stylesheet:
--------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
    <xsl:template match="/">
        <html>
            <head>
                <title>plop</title>
                <link rel="stylesheet" type="text/css" href="simple.css"/>
                <meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" />
            </head>
            <body>
            <h1>Monographie ééé</h1>
                <div>
                    <form method="post" action="ModifierMonographie">
                    ...
--------------------------------------------------------------------------------------

If I use : <map:serialize type="html"/>, everything work but the browser
detect my encoding as IS0-8859-1 (because we can't encode HTML 4.01 as
UTF-8 I guess??)

Since I change it to <map:serialize type="xhtml"/>, my form submit crapy
characters instead of "é", "è", "à", etc. "é" become "é" and so on...
and now the browser detect it as UTF-8

So here is my conclusion:
HTML 4.01  --> ISO-8859-1 --> It works
XHTML --> UTF-8 --> It does not work



Part 2:
-------

So let's see, I keep the xhtml serializer and change the output from
UTF-8 to ISO-8859-15:

--------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="iso-8859-15"
indent="no"/>
    <xsl:template match="/">
        <html>
            <head>
                <title>plop</title>
                <link rel="stylesheet" type="text/css" href="simple.css"/>
                <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-15" />
            </head>
            <body>
            <h1>Monographie ééé</h1>
                <div>
                    <form method="post" action="ModifierMonographie">
                     ...
--------------------------------------------------------------------------------------

Ok now the browser detect the web page as ISO-9959-15 but if I check the
source of the page I see a <?xml version="1.0" encoding="UTF-8"?> and
the display is crapy, ("é" become "é") and the form submission work
perfectly...
I force UTF-8 in the browser, the display of the page is OK now but the
form submission does not work anymore...

(I tried with IE but it's some kind of worst of course)

So, if someone got an idea,

Thank you in advance ;-)


Fred




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message