cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Reynolds <>
Subject Sending a parameter to Xerces (allow java char encodings)
Date Wed, 17 Jul 2002 15:23:24 GMT

I'm trying to get Xerces 2 (that comes with Cocoon 2.0.2) to parse 
MacRoman encoded xml files.

According to the Xerces FAQ 
( you can run the 
following java code to tell it to recognise and process all character 
encodings suppored by Java. The linux-jdk1.2.2 that I'm using does 
support MacRoman encoded text, so this is, of course, what I want to 

import javax.xml.parsers.SAXParser;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

SAXParser parser = /* created from SAXParserFactory */;
XMLReader reader = parser.getXMLReader();
try {
catch (SAXException e) {
     System.err.println("could not set parser feature");

Question is, how the hell to I tell Cocoon (or Tomcat????) to run 
this Java code after loading the Xerces parser?

Is there any easier way to tell Xerces to allow java encodings, eg a 
config file or something???

Thanks very much


       Jesse Reynolds - Virtual Artists Pty Ltd -

     Email: jesse (at)            > Website Development
     Phone: +61 (0)8 8223 2288              > Web & Email Hosting
       Web:          > Streaming Media Hosting
                                            > Telehousing / Colocation

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message