Reimo
12-02-2008, 06:45 AM
Hi,
I'm having an encoding problem in IE6 and Outlook.
In the XML I have To, CC, Subject and Body elements which are turned into a Mailto link by the XSL.
This creates a HTML page with the link, and when I click on it, it opens a mail template in Outlook.
Only problem is that some mails must be in French, and so "é", "è" and "à" for example don't show up properly in the Outlook message, or even in IE6 if I try to display it.
For example, I get " pièce " in stead of "pièce".
I wrote the xml and xsl in notepad - ASCII - and it creates an error in IE6 if I save the xml or xsl as UFT-8. (I had encoding="UFT-8" in the xsl before, but nothing changed when I modified it to ISO...)
Anybody have an idea of what the problem could be ?
Below is the xml and xsl code.
XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="contacts.xsl"?>
<messages>
<contact id="Daily MIS">
<to>test@test.com</to>
<subject>Daily Report</subject>
<body>
Bonjour,%0A%0A
Vous trouverez en pièce jointe le report pour aujourd'hui.%0A%0A
Les numéros dans les cellules correspondent à une description détaillée dans le second onglet.%0A%0A
Cordialement,%0A%0A
</body>
</contact>
</messages>
XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<body>
<h2>SEND MAIL TO:</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Contact</th>
<th align="left">Create Mail</th>
</tr>
<xsl:for-each select="messages/contact">
<tr>
<td>
<A>
<xsl:attribute name="href">mailto:
<xsl:apply-templates select="to"/>
<xsl:text>&CC=</xsl:text>
<xsl:apply-templates select="cc"/>
<xsl:text>?Subject=</xsl:text>
<xsl:value-of select="subject"/>
<xsl:text>&body=</xsl:text>
<xsl:value-of select="body"/>
</xsl:attribute>
<xsl:value-of select="@id"/>
</A>
</td>
<td>
<xsl:value-of select="subject"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks,
I'm having an encoding problem in IE6 and Outlook.
In the XML I have To, CC, Subject and Body elements which are turned into a Mailto link by the XSL.
This creates a HTML page with the link, and when I click on it, it opens a mail template in Outlook.
Only problem is that some mails must be in French, and so "é", "è" and "à" for example don't show up properly in the Outlook message, or even in IE6 if I try to display it.
For example, I get " pièce " in stead of "pièce".
I wrote the xml and xsl in notepad - ASCII - and it creates an error in IE6 if I save the xml or xsl as UFT-8. (I had encoding="UFT-8" in the xsl before, but nothing changed when I modified it to ISO...)
Anybody have an idea of what the problem could be ?
Below is the xml and xsl code.
XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="contacts.xsl"?>
<messages>
<contact id="Daily MIS">
<to>test@test.com</to>
<subject>Daily Report</subject>
<body>
Bonjour,%0A%0A
Vous trouverez en pièce jointe le report pour aujourd'hui.%0A%0A
Les numéros dans les cellules correspondent à une description détaillée dans le second onglet.%0A%0A
Cordialement,%0A%0A
</body>
</contact>
</messages>
XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<body>
<h2>SEND MAIL TO:</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Contact</th>
<th align="left">Create Mail</th>
</tr>
<xsl:for-each select="messages/contact">
<tr>
<td>
<A>
<xsl:attribute name="href">mailto:
<xsl:apply-templates select="to"/>
<xsl:text>&CC=</xsl:text>
<xsl:apply-templates select="cc"/>
<xsl:text>?Subject=</xsl:text>
<xsl:value-of select="subject"/>
<xsl:text>&body=</xsl:text>
<xsl:value-of select="body"/>
</xsl:attribute>
<xsl:value-of select="@id"/>
</A>
</td>
<td>
<xsl:value-of select="subject"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks,