cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ". ." <>
Subject RE: System upgrade and now Cocoon is escaping tabs/entities.
Date Wed, 29 Sep 2010 05:10:43 GMT

> &#a9 should be a copyright symbol if you're using ASCII.
> I suspect that &#a9 is being used instead of a newline (0xa) followed by
> a tab (0x9).

Actually it was a typo on my part. It's using &#9; :( *oops*

> My guess is that your JVM's file.encoding system property used to be
> something like ISO-8859-1 or UTF-8 and now it's been changed to
> something that is more exotic, perhaps even mandating 16-bit characters
> (though your pages would be horribly jumbled if everything were
> interpreted at 16-bit characters).
> Check the file.encoding of your JVM in the old, working system relative
> to the new, broken one. Also, check to make sure that your XML files
> have the "encoding" set in the <?xml?> processing instruction, and that
> the encoding actually matches what you used when you wrote the file to
> the disk. Finally, check to see if you have BOM characters at the start
> of your XML files.
> This is likely to solve both of your problems.

I wrote a little JSP page to spit out the System.getProperty("file.encoding") value and got
some surprising results. I tried two of the existing machines and got ISO-8859-1
for one and ANSI_X3.4-1968 for the other. The application runs fine on both of them. On the
new server that too is giving out  ISO-8859-1.

That said, we did an experiment last night and copied the entire previous Tomcat folder over
to the new CentOS server and ran it with Sun JDK 1.4.29 - the problem disappeared. When we
ran it with JDK 1.5 or 1.6 the problem manifested itself.

So the problem appears to related to the JDK in some way. Googling I came up with this:

Which makes me wonder if the old Xalan from our previous Tomcat is having issues with JDK
1.5 and up. I guess an Xalan upgrade is in order.

> NB: Tomcat 5.0 has been retired and really should be replaced. Upgrading
> to Tomcat 6.0 shouldn't be too much trouble.

Only issue there is we have to support this legacy application for another 12 months and it's
a "hand me down" so we have little or no source code or documentation. Porting it now would
take up more time/effort than is financially viable right now :(

- J
View raw message