I also have the same problem in Win 2000 Server.
I solve this with change my Locale to Ukrainian,
delete all files in ...WEB-INF/tmp
And now it works OK. But I do not shure that it's
good solution. I use "windows-1251" encoding
It is work only in cocoon 2.0.1
In 2.0.2 I have "ðÒÉ×ÅÔ" insted of my russian characters :(
 
----- Original Message -----
From: yuryx
Sent: Thursday, March 28, 2002 9:29 AM
Subject: Re: Encoding non-english characters in XSP (C2.0.2)


I fail to see difference. In both cases, in Cocoon 2.0.1 and in Cocoon
2.0.2, XSP page with KOI8-R encoding, produces following Java code:

this.characters("\n ??????\n ");

yes, in sample_xsp.java:

        this.characters("\n    ");
     

    this.contentHandler.startElement(
      "",
      "h4",
      "h4",
      xspAttr
    );
    xspAttr.clear();

   
        this.characters("Привет from XSP");
     

    this.contentHandler.endElement(
      "",
      "h4",
      "h4"
    );

   
        this.characters("\n ");
sample.xsp:
<?xml version="1.0" encoding="KOI8-R"?>

<xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp" >


<page>
 <title>title</title>

 <content>
    <h4>Привет from XSP</h4>
 </content>

 </page>
</xsp:page>

..and
sample.xsl:
<?xml version="1.0" encoding="KOI8-R"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
              

  <xsl:template match="page">
   <html>
    <head>
     <title>
      <xsl:value-of select="title"/>
     </title>
    </head>
    <body bgcolor="white" alink="red" link="blue" vlink="blue">
  <h4>Привет from XSL</h4>
     <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>

in sitemap.xmap:
    <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer">
      <buffer-size>1024</buffer-size>
      <encoding>KOI8-R</encoding>
    </map:serializer>

  <map:match pattern="sample">
    <map:generate type="serverpages" src="sample.xsp"/>
    <map:transform src="stylesheets/sample.xsl"/>
    <map:serialize/>
   </map:match>

But in output page :

Привет from XSL

ðÒÉ×ÅÔ from XSP

And I don't understand this ...
:((

Sorry by  repeat the  question

Thanx.
Yury.



Check that you do not have any other changes in your environment. For
me, both versions of Cocoon produce bunch of question marks when trying
to use KOI8-R encoding.

Vadim

--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]>For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to