RE: Encoding non-english characters in XSP (C2.0.2)

2002-03-29 Thread Vadim Gritsenko

 From: Andrey Demchenko [mailto:[EMAIL PROTECTED]]
 
 Hi, Vadim.
 
 - Original Message -
 From: Vadim Gritsenko [EMAIL PROTECTED]
 
   2) How can I put -encoding KOI8-R to javac
in servlet container e.g. Resin 2.0.5, Tomcat 4.0?
 
  You can change encoding for the whole JVM right now
 
 May be this is offtopic but I do not know
 how set encoding for the whole JVM.
 Give me an example for JDK 1.3, 1.4, please.

One way:
For Win: Start - Settings - Control Panel - Regional Options,
For Unix: LOCALE=..., may be something else also.

Another:
Use java -D...=..., but you should search what the system property is.
It is something about files and encodings.

Vadim


-
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]




RE: Encoding non-english characters in XSP (C2.0.2)

2002-03-28 Thread Vadim Gritsenko

Ok, I see, you have got national characters in the Java file (I do not have them, may 
be because of different locale).

Next step for you would be:
1. Switch back to Javac (pizza does not support Java file encoding option)
2. Make sure Javac gets -encoding KOI8-R command line option

and everything should be ok.

Vadim


From: yuryx [mailto:[EMAIL PROTECTED]] 

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
 titletitle/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=-2xsl:copyxsl:apply-templates 
select=@*|node()//xsl:copy/xsl:template
  xsl:template match=text() priority=-1xsl: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-size1024/buffer-size
  encodingKOI8-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. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Encoding non-english characters in XSP (C2.0.2)

2002-03-28 Thread yuryx

Vadim Gritsenko wrote:

Ok, I see, you have got national characters in the Java file (I do not have them, may 
be because of different locale).

Next step for you would be:
1. Switch back to Javac (pizza does not support Java file encoding option)
2. Make sure Javac gets -encoding KOI8-R command line option

and everything should be ok.

Vadim

Hi Vadim!
I switched compiller to Javac and this solve all problems :)

Thanx for you help
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]




Re: Encoding non-english characters in XSP (C2.0.2)

2002-03-28 Thread Andrey Demchenko

1)Thanks. It's works in Cocoon 2.0.1 and 2.0.2.
  I use your recomendations and changed in cocoon.xconf
  parameter name=compiler
value=org.apache.cocoon.components.language.programming.java.Javac/
=
2) How can I put -encoding KOI8-R to javac
 in servlet container e.g. Resin 2.0.5, Tomcat 4.0?

--
Best regards,
Andrey Demchenko.

- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
Next step for you would be:
1. Switch back to Javac (pizza does not support Java file encoding option)

 2. Make sure Javac gets -encoding KOI8-R command line option




-
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]




RE: Encoding non-english characters in XSP (C2.0.2)

2002-03-28 Thread Vadim Gritsenko

 From: Andrey Demchenko [mailto:[EMAIL PROTECTED]]
 
 1)Thanks. It's works in Cocoon 2.0.1 and 2.0.2.
   I use your recomendations and changed in cocoon.xconf
   parameter name=compiler
 value=org.apache.cocoon.components.language.programming.java.Javac/
 =
 2) How can I put -encoding KOI8-R to javac
  in servlet container e.g. Resin 2.0.5, Tomcat 4.0?

You can change encoding for the whole JVM right now, I guess that's what
Yury has. Or you can wait and I will come up with something (I'm
thinking that all string literals should be UTF-8 encoded, this will
allow to use lots of languages simultaneously). Or you can patch it on
your own.

Vadim


 --
 Best regards,
 Andrey Demchenko.
 
 - Original Message -
 From: Vadim Gritsenko [EMAIL PROTECTED]
 Next step for you would be:
 1. Switch back to Javac (pizza does not support Java file encoding
option)
 
  2. Make sure Javac gets -encoding KOI8-R command line option
 


-
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]




Re: Encoding non-english characters in XSP (C2.0.2)

2002-03-28 Thread Andrey Demchenko

Hi, Vadim.

- Original Message - 
From: Vadim Gritsenko [EMAIL PROTECTED]

  2) How can I put -encoding KOI8-R to javac
   in servlet container e.g. Resin 2.0.5, Tomcat 4.0?
 
 You can change encoding for the whole JVM right now

May be this is offtopic but I do not know
how set encoding for the whole JVM.
Give me an example for JDK 1.3, 1.4, please.



-
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]




RE: Encoding non-english characters in XSP (C2.0.2)

2002-03-27 Thread Vadim Gritsenko

 From: yuryx [mailto:[EMAIL PROTECTED]]
 
 Hello all
 
 I have the  following problem:
 After updating cocoon from version 2.0.1 to 2.0.2
 non-english characters are not normally decoded on page , generated by
XSP .

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  );

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

 In XSP page I use following encode declaration:
 ?xml version=1.0 encoding=KOI8-R?
 
 If I use static XML file and XSL transformation,
 output page is fine.
 
 Where am I wrong?
 
 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]




Re: Encoding non-english characters in XSP (C2.0.2)

2002-03-27 Thread yuryx





  I fail to see difference. In both cases, in Cocoon 2.0.1 and in Cocoon2.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
titletitle/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:copyxsl: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-size1024/buffer-size
 encodingKOI8-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. Forme, both versions of Cocoon produce bunch of question marks when tryingto 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]>



Re: Encoding non-english characters in XSP (C2.0.2)

2002-03-27 Thread Andrey Demchenko



I also have the same problem in Win 2000 
Server.
I solve this with change my Localeto 
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 
  To: [EMAIL PROTECTED] 
  
  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 Cocoon2.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" 
  pagetitletitle/titlecontent 
  h4Привет from 
  XSP/h4/content/page/xsp:page..andsample.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:copyxsl:apply-templates 
  select="@*|node()"//xsl:copy/xsl:template 
  xsl:template match="text()" priority="-1"xsl:value-of 
  select="."//xsl:template/xsl:stylesheetin 
  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-size1024/buffer-size 
  encodingKOI8-R/encoding 
  /map:serializer map:match 
  pattern="sample" map:generate type="serverpages" 
  src="sample.xsp"/ map:transform 
  src="stylesheets/sample.xsl"/ 
  map:serialize/ /map:matchBut in output 
  page :
  Привет from XSL
  ðÒÉ×ÅÔ from XSPAnd I don't understand this ...:((Sorry 
  by repeat the questionThanx.Yury.
  Check that you do not have any other changes in your environment. Forme, both versions of Cocoon produce bunch of question marks when tryingto 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]>