cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yuryx <yu...@mobicomk.donpac.ru>
Subject JSPGenerator encoding problem
Date Thu, 07 Feb 2002 16:50:01 GMT
Hello all!

I have following problem.
JSPGenerator doesn't normally encoding non english  characters.
Simple sample:
sample.jsp:
<%out.println("<?xml version='1.0' encoding='koi8-r'?>");%>
<%@ page language="java" 
import="java.text.SimpleDateFormat,java.util.*,java.sql.*"%>

<page>
    <content>
        <%out.println("<para>привет!</para>");%>
    </content>
</page>

sample.xsl:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                xmlns:xsp-request="http://apache.org/xsp/request/2.0"

  <xsl:template match="page">
   <html>
    <head>
     <title>
      <xsl:value-of select="title"/>
     </title>
    </head>
    <body bgcolor="white" alink="red" link="blue" vlink="blue">
     <xsl:apply-templates/>
    </body>
   </html>
  </xsl:template>
   
  <xsl:template match="para">
    <b><xsl:value-of select="."/></b>
  </xsl:template>
</xsl:stylesheet>

I have following  line in sitemap:
<map:generator name="jsp"  
src="org.apache.cocoon.generation.JspGenerator" 
logger="sitemap.generator.jsp" label="content,data">
    <encoding>KOI8-R</encoding>
</map:generator>
...and...
   <map:match pattern="sample-jsp">
     <map:generate type="jsp" src="/statesql/sample.jsp"/>
     <map:transform src="statesql/sample.xsl"/>
     <map:serialize type="html"/>
    </map:match>   

After generation I have next:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body vlink="blue" link="blue" alink="red" bgcolor="white">
<content>
???    <b>&ETH;&Ograve;&Eacute;&times;&Aring;&Ocirc;!</b>
???
</content>    
</body>
</html>



Can anyone help me?
Thanx
Yury



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message