RE: Character encoding problems with XSP/ESQL

2002-06-13 Thread Jan Uyttenhove

Andrew,

I helped Michael Mangeng to solve a similar problem a while ago. Well,
similar..., it was a pure xsp problem there, no esql. I have no expercience
with esql, but I'll add some things you can try, but I don't know it is in
fact the same problem :-)

This is what Vadim reported, after Michael posted his solution:

As of Cocoon 2.0.3 (which has some XSP fixes) it should work like this:
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 How to use german umlauts on english *nix systems:

 sitemap.xmap:
 Use encodingISO-8859-1/encoding in the according (e.g. html)
 map:serializer tag.

 XML/XSP:
 Use: ?xml version=1.0 encoding=ISO-8859-1?
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


I don't know which version of Cocoon you're using, but according to Vadim
this should work, so try this first.
If this doesn't help you (I don't know if Michael eventually tested it this
way), take a look at the nice overview of our solution. Michael posted it
some days ago, here are the points:

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
How to use german umlauts on english *nix systems:

Set *nix locale to de_AT (or de_DE):
localedef -c -i de_AT -f ISO-8859-1 de_AT

Set LANG (system environment var) to de_AT (or de_DE)
export LANG='de_AT'

Before starting Tomcat set:
$CATALINA_OPTS to '-Dfile.encoding=ISO8859_1'

sitemap.xmap:
Use encodingISO-8859-1/encoding in the according (e.g. html)
map:serializer tag.

XML/XSP:
Use: ?xml version=1.0 encoding=ISO-8859-1?
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

As you can see, it has someting to do with the locale settings of *nix. It
took me some time to figure it out a while ago, but it does make sense, if
you consider that xsp's get converted to Java classes on the filesystem.

And finally, if this doesn't work either, I think it has to do with the esql
part of your problem. For that you'll have to find someone more experienced
with esql :-)

Hope this helps you any further!

Greetz,

Jan

visit us @ http://www.xume.be

-Original Message-
From: Andrew Savory [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
Savory
Sent: donderdag 13 juni 2002 20:14
To: [EMAIL PROTECTED]
Subject: Re: Character encoding problems with XSP/ESQL



On Thu, 13 Jun 2002, KOZLOV Roman wrote:

 Hi Andrew,

 Did you set encodingiso-8859-1/encoding for serverpages generator
also? Do you
 also use some transformers?

Yup, set encoding on anything and everything that might affect it. Still
not working :-/

Andrew.

--
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)700 598 1135
This is not an official statement or order.Web:www.luminas.co.uk


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: Character encoding problems with XSP/ESQL

2002-06-13 Thread Jan Uyttenhove


 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: donderdag 13 juni 2002 23:16
 To: [EMAIL PROTECTED]
 Subject: RE: Character encoding problems with XSP/ESQL

 Andrew,

 I would follow Jan's suggestion to isolate issue. First, make sure that
 static XML with your target encoding and your set of funny characters
 works ok. Then move on to the XSP. After that, add SQL.

 Chances are that your database returns broken strings. See also recent
 Argyn's email about it: he had *one* 3-byte Chinese character in the
 database, but it was extracted as *three* characters, i.e. string.size()
 returned 3 instead of 1, clearly indicating that string is broken and
 have to be re-encoded.

I agree with Vadim.
But if XSP works just fine, and adding SQL seems to be the problem, it might
be interesting to check the PostgreSQL mailing list also.
I remember there are a lot of problems listed regarding character encoding,
maybe it's a postgreSQL problem, to be more specific, a JDBC-PostgreSQL
problem, since there's no problem using perl...

Jan

visit us @ http://www.xume.be






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: Tomcat/cocoon encoding problem

2002-06-08 Thread Jan Uyttenhove



Try to 
start the jvm (tomcat startup) with property 
-Dfile.encoding=ISO8859_1

Maybe 
you should choose another encoding, I used ISO8859_1 to solve a similar problem 
with french characters.

Hope 
this helps.

Greetz,

Jan


visit us @ http://www.xume.be


  -Original Message-From: Michael Mangeng 
  [mailto:[EMAIL PROTECTED]]Sent: vrijdag 7 juni 2002 
  16:47To: [EMAIL PROTECTED]Subject: 
  Tomcat/cocoon encoding problem
  Hi
  
  I´ve set the encoding of both the xsp and the xml 
  serializer correctly. Afteri requestthe xml i get the right 
  encoding - ISO-8859-1 in the ?xml ... ? tag but german umlaut´s like 
  äöü are replacedby '?'.
  
  I´ve noticed the same problem when i use beans on 
  my JSP Pages (without cocoon; only tomcat)
  (Using äöü on a jsp works - but as soon as i set 
  the data in a bean and then request it back - i have äöü instead of the 
  umlauts in my string).
  
  I´m using linux 2.4.17, jdk1.3.1, tomcat 
  4.1.2alpha and cocoon2.0.2.
  
  So... Is there a anywhere a setting for the jvm, 
  tomcat or cocoonthatthe umlauts arecorrectly displayed 
  ?
  
  greetings 
  mike


RE: C2 Installation on JRun 3.x...

2001-11-27 Thread Jan Uyttenhove

Well, I also managed to get it working but I can confirm your problem.

It has something to do with the order of the JARs in the classpath.
Conflicts between JRun JARs and Cocoon JARs, and off course JRun wins... :-)
You can change the order of how the classpath is composed in the
global.properties file in the JRun/lib directory.

e.g. if you put the user.classpath in front, things work fine with all the
Cocoon JARs in the WEB-INF/lib.
Off course it does... but who wants to work like this if you have more than
one server running?

Jan

-Original Message-
From: SANSONE, AARON M [Non-Pharmacia/1000]
[mailto:[EMAIL PROTECTED]]
Sent: woensdag 21 november 2001 17:09
To: Cocoon-Users (E-mail)
Subject: C2 Installation on JRun 3.x...


Has anyone successfully installed C2 on a JRun Servlet engine?  I have had
some success but am trying to package an application as a WAR file and
deploy.  My problem is that Cocoon2 won't run unless the JAR files are
located in the JRun server lib directory.  According to the Servlet 2.2
spec, the JAR files for cocoon2 should be placed in the WEB-INF/lib
directory and picked up by the Servlet engine.  However when I do this I get
the following error message:

/cocoon2/:

null
java.lang.NoSuchMethodError
at
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.init
(DefaultConfigurationBuilder.java:38)
at
org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:398)
at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:128)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:203)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:161)
at
allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServletLoa
der.java:149)
at
allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1705)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1231)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)


Anyone have any ideas?


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




RE: [C2b2] Unicode output

2001-08-03 Thread Jan Uyttenhove

I'm not sure, but it seems to me that the encoding specified in the source
XML file doesn't make any difference. I came accross some comments in the
source code saying thet the setEncoding() method hasn't been implemented
yet.

You can specify an encoding when serializing. But the default is UTF-8, I
think...
If you want to try, use for example
map:serializer name=html mime-type=text/html
src=org.apache.cocoon.serialization.HTMLSerializer
 encodingISO-8859-1/encoding
/map:serializer
in your sitemap.

As I said, we experienced almost the same problem, but only when data was
written to disk (e.g. logfiles). So you can try adding the encoding to the
serializer.
You can also try adding the file.encoding, we're using Cocoon with Tomcat,
so I put -Dfile.encoding=ISO8859_1 in the TOMCAT_OPTS variable used when
tomcat is started...
A list of encodings:
http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

Hope this helps, this is what solved our problems...


Jan Uyttenhove
Software Engineer

-Original Message-
From: Wes Morgan [mailto:[EMAIL PROTECTED]]
Sent: donderdag 2 augustus 2001 15:42
To: [EMAIL PROTECTED]
Subject: Re: [C2b2] Unicode output


I don't know if this will help me or not. I am running RedHat Linux 6.2
and I do not currently use XSP anywhere. I also do not specify an
encoding when serializing. The XML source file has encoding=UTF-8 in
it's ?xml ...? PI, do I also have to say something to that effect in
my sitemap in the map:serialize .../ element? Thank you for your response.

Wes Morgan

Jan Uyttenhove wrote:

We had the same problem with french characters.
I had to set the file.encoding system property (on Solaris), because the
generated java code (from xsp) and our logging both contained '?' instead
of
the french characters. So the problem actually occurred when writing on
disk...

Don't know if this helps you out.
What's your OS? Do you use xsp's?
Do you specify an encoding when serializing?

Jan


Jan Uyttenhove
Software Engineer




-Original Message-
From: Wes Morgan [mailto:[EMAIL PROTECTED]]
Sent: maandag 30 juli 2001 22:09
To: [EMAIL PROTECTED]
Subject: [C2b2] Unicode output


I am working with some XML documents that have Greek and Hebrew Unicode
characters in them. I am using Unicode fonts on the client side, so I need
these characters to come through unmodified, but Cocoon changes them to '?'
if it doesn't recognize them and to a character entity (e.g. epsilon;)
when
it does. This is bad, I need Cocoon to leave these characters alone. Any
suggestions? Thanks.

Wes Morgan
www.ccel.org


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




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