Thanx for all! For solved this problem just use: String par=new String(request.getParameter("text1").getBytes("ISO-8859-1"),"KOI8-R");
Regards. Yury. yuryx wrote: > Hi all! > > I had the following problem: > In my cocoon's page I had invalid encoding my non-english characters > from request. > > with example: > > simple.xsp > > <?xml version="1.0" encoding="KOI8-R"?> > > > <xsp:page language="java" > xmlns:xsp="http://apache.org/xsp" > > > > <page> > > <title>simple</title> > > <content> > <form name="f1" method="get"> > <xsp:logic> > String par=request.getParameter("text1"); > </xsp:logic> > <h4><xsp:expr>par</xsp:expr></h4> > <input name="text1" type="text"/> > <input name="button1" type="submit"/> > </form> > </content> > > </page> > </xsp:page> > > simple2html.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="@*|node()" > priority="-2"><xsl:copy><xsl:apply-templates > select="@*|node()"/></xsl:copy></xsl:template> > <xsl:template match="text()" priority="-1"><xsl:value-of > select="."/></xsl:template> > > </xsl:stylesheet> > > sitemap.xmap section: > > <map:match pattern="test/*"> > <map:generate type="serverpages" src="work/test/{1}.xsp"/> > <map:transform src="work/test/simple2html.xsl"/> > <map:serialize type="html"/> > </map:match> > > work result: > > <html xmlns:xsp-request="http://apache.org/xsp/request/2.0"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=KOI8-R"> > <title>simple</title> > </head> > <body vlink="blue" link="blue" alink="red" bgcolor="white"> > > <title xmlns:xsp="http://apache.org/xsp">simple</title> > > <content xmlns:xsp="http://apache.org/xsp"> > > <form name="f1" method="get"> > <h4>×Á×</h4> > <input name="text1" type="text"> > <input name="button1" type="submit"> > > </form> > </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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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]>