xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinuta Nagaraddi <vnagara...@brandmuscle.com>
Subject RE: XMLParser error with unicode characters in XML file.
Date Tue, 06 Jul 2004 21:31:58 GMT
I had a similar problem.  I am writing to a file using the following code:

File outputDir = new File(outputPath);

String foFile = outputPath + "/image.fo";
log.debug("Writing to file " + foFile);
FileOutputStream fileoutstream = new FileOutputStream(foFile);
Writer writer = new OutputStreamWriter(fileoutstream, "utf8");

The important part of the code is writing to the file using utf8 encoding.

Vinuta Nagaraddi

-----Original Message-----
From: Manoj_Nair@spe.sony.com [mailto:Manoj_Nair@spe.sony.com] 
Sent: Tuesday, July 06, 2004 5:28 PM
To: fop-user@xml.apache.org
Cc: fop-dev@xml.apache.org
Subject: XMLParser error with unicode characters in XML file.

I am getting a XML parsing error from weblogic.apache.xerces when I parse a
document which contains accented characters.

This is what I am doing
1) Some database columns have accented data for spanish,japanese etc
like Número de identificação: and número de identificación.

2) I am reading this data and creating a XML file using some processing and
then writing the file on the disc using weblogic.xml.stream.XMLOutputStream
flush() method.

3) Then I am using FOP to render this XML in PDF. In the rendering process
the weblogic.apache.xerces.XMLparser gets called to parse the XML. Here the
parser throws a org.xml.sax.SAXParserException ( An invalid XML character
(Unicode: 0xfa) was found in the element content of the document).

I was under the impression that XMLParser should take care of the accented
characters. When I open the XML file which I created in XML SPY I see "box"
characters like "cliente  n� de identificaci򬺯".

Please let me know how should i handle my code here.



To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org

View raw message