Hi bernhard, If it is an static xml page then the encoding is working. so i think transformer and the serializer are working fine. when make the same page as an xsp page then it is not working. it is diplaying ???????? i have attached both the static xml and the xsp page . In my site map i have confiured like this
<map:match pattern="hello.xsp"> <map:generate type="serverpages" src="hello.xsp"/> <map:transform src="to-html.xsl"/> <map:serialize type="html"/> </map:match> <map:match pattern="hello1.xml"> <map:generate src="hello.xml"/> <map:transform src="to-html.xsl"/> <map:serialize type="html"/> </map:match> The serializerencoding is already set. Do we have to specify the ServerPageGenerator to handle the xsp with Shift_JIS encoding? Thanks Priya > ----- Original Message ----- > From: "Bernhard Huber" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, December 30, 2001 1:36 PM > Subject: Re: encoding Shift_JIS problem in cocoon 2.0 > > > > Hi, > > Can you sort out when the conversion to ??? chars happens? > > Knowing this helps to understand who is guilty, the xsp-generator, the > > transformer, or the serializer > > 1) Try to remove the xsp step delivering the xml as-is via cocoon > > 2) Do you use a transformer step? > > > > bye bernhard > > > > Priya Padate wrote: > > > > > am using tomcat 3.2.3 and cocoon 2.0 ,i want to display a simple xsp > > > page with japanese characters encoding ="Shift_JIS" > > > > > > > > > > > > i have set this > > > > > > <?xml version="1.0" encoding="Shift_JIS" ?> > > > but it doesn't seem to work . > > > > > > The same works fine with tomcat 3.2.3 and cocoon 1.8.x. > > > > > > > > > > > > i have also set > > > > > > <map:serializer name="html" mime-type="text/html" > > > src="org.apache.cocoon.serialization.HTMLSerializer"> > > > <encoding>Shift_JIS</encoding> > > > </map:serializer> > > > > > > > > > > > > > > > > > > What i get is only ?????? in place of characters. > > > > > > > > > > > > Look's like am missing something. > > > > > > Can anyone shed some light on this problem. > > > > > > > > > > > > Thanks > > > > > > > > > > > > Priya > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already been answered in the > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> >
hello.xsp
Description: Binary data
<?xml version="1.0" encoding="Shift_JIS" ?> <page> <body> <heading>翻訳 トップ</heading> <label>こちらに翻訳後の文章が表示されます。</label> </body> </page>
<?xml version="1.0" encoding="Shift_JIS"?> <!-- /** **************************************************************************** * Project Code: ejn/2266-melpo * Module Name: Melpo Server web Module * File Name:to-html.xsl * Description: Generic Stylesheet for displaying xml pages to html * Author: Arun * Copyright (c) 2000 EximSoft Technologies pvt. ltd. * Created on:01/12/2001 * Current Version:00.00.00 * Last Modified on:01/12/2001 * Ver Date Author Change Description 00.00.00 01/12/2001 Arun Intial Version **************************************************************************** **/ --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <xsl:apply-templates /> </html> </xsl:template> <xsl:template match="title"> <head> <title><xsl:value-of select="."/></title> </head> </xsl:template> <xsl:template match="body"> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="center"> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="heading"> <center><h3> <xsl:apply-templates /> </h3></center> </xsl:template> <xsl:template match="a"> <a> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> <xsl:apply-templates/> </a> </xsl:template> <xsl:template match="br"> <br /> </xsl:template> <xsl:template match="hr"> <hr/> </xsl:template> <xsl:template match="form"> <xsl:element name="form"> <xsl:attribute name="method"><xsl:value-of select="@method"/></xsl:attribute> <xsl:attribute name="action"><xsl:value-of select="@action"/></xsl:attribute> <xsl:attribute name="enc-type"><xsl:value-of select="@enc-type"/></xsl:attribute> <xsl:attribute name="charset"><xsl:value-of select="@charset"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="input"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> <xsl:attribute name="maxlength"><xsl:value-of select="@maxlength"/></xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="do"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> </xsl:element> </xsl:template> <!-- for wap --> <xsl:template match="submit"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="reset"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="hidden"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="checkbox"> <xsl:element name="input"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="type"><xsl:value-of select="@type" /></xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute> </xsl:element> </xsl:template> <xsl:template match="textarea"> <xsl:element name="textarea"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="rows"><xsl:value-of select="@rows" /></xsl:attribute> <xsl:attribute name="cols"><xsl:value-of select="@cols"/></xsl:attribute> <xsl:value-of select="@value"/> </xsl:element> </xsl:template> <xsl:template match="font"> <xsl:element name="font"> <xsl:attribute name="color"><xsl:value-of select="@color" /></xsl:attribute> <xsl:value-of select="."/> </xsl:element> </xsl:template> <xsl:template match="label"> <xsl:apply-templates /> </xsl:template> <xsl:template match="message"> <xsl:apply-templates /> </xsl:template> <xsl:template match="select"> <xsl:element name="select"> <xsl:attribute name="name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="optionchecked"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="@value" /></xsl:attribute> <xsl:attribute name="selected"><xsl:value-of select="@selected" /></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="option"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="@value" /></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="p"> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="b"> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="h3"> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:template> <xsl:template match="sp"> </xsl:template> <xsl:template match="Response"> <center><xsl:value-of select="Message" /></center> </xsl:template> <xsl:template match="Folders"> <xsl:element name="select"> <xsl:attribute name="name">folder</xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="Folder"> <xsl:if test="normalize-space(@no) = '3'"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="@no" /></xsl:attribute> <xsl:attribute name="selected">true</xsl:attribute> <xsl:value-of select="." /> </xsl:element> </xsl:if> <xsl:if test="@no != '3'"> <xsl:element name="option"> <xsl:attribute name="value"><xsl:value-of select="@no" /></xsl:attribute> <xsl:value-of select="." /> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="ErrorResponse"> <center><xsl:value-of select="Message" /></center> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>