You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Craig McDaniel <cp...@gmail.com> on 2005/11/25 22:14:01 UTC

Non-breaking space turning into "??"

I am trying to debug a PDF rendering for a client where non-breaking
spaces are comming out as double question marks "??". FOP is being
called from a servlet. I have tried using the fop command line tool
and can not reproduce the problem. I have written an simple servlet on
another system that functionally does the same thing, and can not
reproduce the problem here either.

Any ideas what could cause this? Is it some kind of character encoding
issue? The entity &#x00a0; is being used. What should my next step be
in debugging this?

--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Chris Bowditch <bo...@hotmail.com>.
Craig McDaniel wrote:
> Well, the FileReader is reading into a String and then it is converted
> to a byte array using getBytes(). I know, its weird, but I'm not the
> original author of this code and its my job to "fix" it.

That's likely to be the cause of the encoding problem. There's an 
implicit coversion from String to bytes, which unless you specify an 
encoding for, falls back to the default encoding. It would be more 
efficient and less prone to error if you just used a FileInputStream 
instead. Then no conversions between byte and string and back again are 
required.

<snip/>

Chris



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


Re: Non-breaking space turning into "??"

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Craig McDaniel wrote:
> Well, the FileReader is reading into a String and then it is converted
> to a byte array using getBytes().

Gaaaa! Run away, as fast as possible! That's the kind of code
which decreases your IQ, makes you blind and causes world hunger!

Well, since you looked at it already, you could as well post it
to
  http://www.thedailywtf.com/
so that others could also have fun.

J.Pietschmann

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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
Well, the FileReader is reading into a String and then it is converted
to a byte array using getBytes(). I know, its weird, but I'm not the
original author of this code and its my job to "fix" it.

On 12/1/05, J.Pietschmann <j3...@yahoo.de> wrote:
> Craig McDaniel wrote:
> > However,
> > when I create a FileReader for this same File ("results" in the code
> > above), and do file.getEncoding(), it prints "ASCII".
>
> A plain file reader doesn't know it's reading XML, and always uses
> the platform's default encoding.
>
> > Again, this prints "Encoding for /tmp/quarterly40215.xml: ASCII". At
> > this point, the reader is used to read the file into a byte array.
> > Then it is wrapped in a ByteArrayInput stream and fed to the FOP
> > Driver. Are we any closer?
>
> You can't use a FileReader to read into a byte array. You can't
> wrap a ByteArrayInputStream around a FileReader either. You surely
> mean something else?
>
> J.Pietschmann
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Craig McDaniel wrote:
> However,
> when I create a FileReader for this same File ("results" in the code
> above), and do file.getEncoding(), it prints "ASCII".

A plain file reader doesn't know it's reading XML, and always uses
the platform's default encoding.

> Again, this prints "Encoding for /tmp/quarterly40215.xml: ASCII". At
> this point, the reader is used to read the file into a byte array.
> Then it is wrapped in a ByteArrayInput stream and fed to the FOP
> Driver. Are we any closer?

You can't use a FileReader to read into a byte array. You can't
wrap a ByteArrayInputStream around a FileReader either. You surely
mean something else?

J.Pietschmann

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


Re: Non-breaking space turning into "??"

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Dec 1, 2005, at 05:43, Craig McDaniel wrote:

Hi,

Going to answer a bit out of order...

> log.debug("Encoding for " + foFile + ": " + fileReader.getEncoding());
>
> ....this prints "UTF8" as the encoding (without the dash). What's up
> with that? Anyway, I think we are getting closer.

That's nothing to worry about. "UTF8" is just the Java designation.  
It's the same with or without the dash...

> On 11/30/05, Craig McDaniel <cp...@gmail.com> wrote:
>> I've been able to debug this a little bit, and it seems that, even
>> though I am setting the output encoding to UTF-8, it is being written
>> as ASCII.

Because you didn't specify an encoding to use at that point, the  
default platform encoding was used, but OK, you corrected that... Now,

>> The first log message indeed prints "Output Encoding: UTF-8".  
>> However,
>> when I create a FileReader for this same File ("results" in the code
>> above), and do file.getEncoding(), it prints "ASCII". Also, when I
>> look at the file with less, I see "General<C2><A0>Electric" and in
>> emacs, I see "General??Electric". This is just an XSL transform up to
>> this point, nothing FOP-specific (though the file is a FO document),
>> so perhaps the Xalan list is the proper place for this question?

Have you looked at the XML header in the intermediate file? Another  
place to look would be the encoding attribute on the xsl:output  
element in the stylesheet (if any, and this deviates from UTF-8, etc.)

HTH!

Cheers,

Andreas


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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
Whoops. Ignore the "html" variable name, it should be "foFile".

On 11/30/05, Craig McDaniel <cp...@gmail.com> wrote:
> OK, I was able to get one of the question marks to go away (leaving a
> single question mark where the space should be). Here is what I
> changed:
>
> serializer.setOutputStream(new PrintStream(new
> FileOutputStream(results), false, "UTF-8"));
>
> and to read the file....
>
> InputStreamReader fileReader = new InputStreamReader(new
> FileInputStream(html), "UTF-8");
> BufferedReader reader = new BufferedReader(fileReader);
> log.debug("Encoding for " + html + ": " + fileReader.getEncoding());
>
> ....this prints "UTF8" as the encoding (without the dash). What's up
> with that? Anyway, I think we are getting closer.
>
> On 11/30/05, Craig McDaniel <cp...@gmail.com> wrote:
> > I've been able to debug this a little bit, and it seems that, even
> > though I am setting the output encoding to UTF-8, it is being written
> > as ASCII. Since we can't get much farther without posting code, here
> > goes:
> >
> >   Serializer serializer = SerializerFactory.getSerializer(props);
> >   log.debug("Output Encoding: " +
> > serializer.getOutputFormat().getProperty("encoding"));
> >   serializer.setOutputStream(new FileOutputStream(results));
> >   filters[lastFilter].setContentHandler(serializer.asContentHandler());
> >   filters[lastFilter].parse(new InputSource(new FileReader(xmlFile)));
> >   log.debug("Finished the transformation");
> >
> > The first log message indeed prints "Output Encoding: UTF-8". However,
> > when I create a FileReader for this same File ("results" in the code
> > above), and do file.getEncoding(), it prints "ASCII". Also, when I
> > look at the file with less, I see "General<C2><A0>Electric" and in
> > emacs, I see "General??Electric". This is just an XSL transform up to
> > this point, nothing FOP-specific (though the file is a FO document),
> > so perhaps the Xalan list is the proper place for this question?
> >
> > Here is the code for the Reader:
> >
> >   FileReader fileReader = new FileReader(foFile);
> >   BufferedReader reader = new BufferedReader(fileReader);
> >   log.debug("Encoding for " + foFile + ": " + fileReader.getEncoding());
> >
> > Again, this prints "Encoding for /tmp/quarterly40215.xml: ASCII". At
> > this point, the reader is used to read the file into a byte array.
> > Then it is wrapped in a ByteArrayInput stream and fed to the FOP
> > Driver. Are we any closer?

--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
OK, I was able to get one of the question marks to go away (leaving a
single question mark where the space should be). Here is what I
changed:

serializer.setOutputStream(new PrintStream(new
FileOutputStream(results), false, "UTF-8"));

and to read the file....

InputStreamReader fileReader = new InputStreamReader(new
FileInputStream(html), "UTF-8");
BufferedReader reader = new BufferedReader(fileReader);
log.debug("Encoding for " + html + ": " + fileReader.getEncoding());

....this prints "UTF8" as the encoding (without the dash). What's up
with that? Anyway, I think we are getting closer.

On 11/30/05, Craig McDaniel <cp...@gmail.com> wrote:
> I've been able to debug this a little bit, and it seems that, even
> though I am setting the output encoding to UTF-8, it is being written
> as ASCII. Since we can't get much farther without posting code, here
> goes:
>
>   Serializer serializer = SerializerFactory.getSerializer(props);
>   log.debug("Output Encoding: " +
> serializer.getOutputFormat().getProperty("encoding"));
>   serializer.setOutputStream(new FileOutputStream(results));
>   filters[lastFilter].setContentHandler(serializer.asContentHandler());
>   filters[lastFilter].parse(new InputSource(new FileReader(xmlFile)));
>   log.debug("Finished the transformation");
>
> The first log message indeed prints "Output Encoding: UTF-8". However,
> when I create a FileReader for this same File ("results" in the code
> above), and do file.getEncoding(), it prints "ASCII". Also, when I
> look at the file with less, I see "General<C2><A0>Electric" and in
> emacs, I see "General??Electric". This is just an XSL transform up to
> this point, nothing FOP-specific (though the file is a FO document),
> so perhaps the Xalan list is the proper place for this question?
>
> Here is the code for the Reader:
>
>   FileReader fileReader = new FileReader(foFile);
>   BufferedReader reader = new BufferedReader(fileReader);
>   log.debug("Encoding for " + foFile + ": " + fileReader.getEncoding());
>
> Again, this prints "Encoding for /tmp/quarterly40215.xml: ASCII". At
> this point, the reader is used to read the file into a byte array.
> Then it is wrapped in a ByteArrayInput stream and fed to the FOP
> Driver. Are we any closer?
>
>
> On 11/25/05, Craig McDaniel <cp...@gmail.com> wrote:
> > On 11/25/05, Andreas L Delmelle <a_...@pandora.be> wrote:
> > > On Nov 25, 2005, at 22:14, Craig McDaniel wrote:
> > >
> > > > I am trying to debug a PDF rendering for a client where non-breaking
> > > > spaces are comming out as double question marks "??". FOP is being
> > > > called from a servlet. I have tried using the fop command line tool
> > > > and can not reproduce the problem. I have written an simple servlet on
> > > > another system that functionally does the same thing, and can not
> > > > reproduce the problem here either.
> > > >
> > > > Any ideas what could cause this? Is it some kind of character encoding
> > > > issue?
> > >
> > > Indeed. The question-marks are most likely related to:
> > > http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/
> > > CharsetEncoder.html
> > >
> > > > The entity &#x00a0; is being used. What should my next step be
> > > > in debugging this?
> > >
> > > Firstly: are you still using FOP 0.20.5? If so, can you try out the
> > > recent alpha release, and report if the problem still occurs?
> >
> > I am using 0.20.5. Unfortunately, I do not have access to deploy
> > changes to the server at this time, so I am unable to test changes in
> > the only environment where the problem is happening ;-(
> >
> > > If you can't (or are already using FOP 0.90alpha), I think the best
> > > bet is to go looking for places --in the servlet code, I presume--
> > > where an XML declaration is hard-coded as a String literal or where a
> > > Charset is used that's different from the default (= UTF-8).
> >
> > The original data file has no XML declaration. The stylesheet has one,
> > but does not have an encoding attribute. The &#x00a0; entities are in
> > the XSL, by the way.
> >
> > I almost feel like I am debugging this thing blind. I do have the
> > source code, but it is too spread out to post here. It might be worth
> > pointing out that the XSL is applied to the XML data and sent to a
> > ByteArrayOutputStream. The byte array is then stored and later passed
> > into the FOP driver as a ByteArrayInputStream. Likewise, the output of
> > the driver is written to a byte array and finally, it gets sent to the
> > browser with response.getOutputStream().write(bytes). Not the way I
> > would have done it. Anyway, like I said, I coded up a servlet just
> > like this one and could not reproduce the problem in my own
> > environment. Perhaps this is a default encoding problem.
> >
> > > HTH!
> >
> > Absolutely, thanks for your help!
> >
> > > Cheers,
> > >
> > > Andreas
> >
> >
> > --
> > Craig McDaniel
> >
>
>
> --
> Craig McDaniel
>


--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
I've been able to debug this a little bit, and it seems that, even
though I am setting the output encoding to UTF-8, it is being written
as ASCII. Since we can't get much farther without posting code, here
goes:

  Serializer serializer = SerializerFactory.getSerializer(props);
  log.debug("Output Encoding: " +
serializer.getOutputFormat().getProperty("encoding"));
  serializer.setOutputStream(new FileOutputStream(results));
  filters[lastFilter].setContentHandler(serializer.asContentHandler());
  filters[lastFilter].parse(new InputSource(new FileReader(xmlFile)));
  log.debug("Finished the transformation");

The first log message indeed prints "Output Encoding: UTF-8". However,
when I create a FileReader for this same File ("results" in the code
above), and do file.getEncoding(), it prints "ASCII". Also, when I
look at the file with less, I see "General<C2><A0>Electric" and in
emacs, I see "General??Electric". This is just an XSL transform up to
this point, nothing FOP-specific (though the file is a FO document),
so perhaps the Xalan list is the proper place for this question?

Here is the code for the Reader:

  FileReader fileReader = new FileReader(foFile);
  BufferedReader reader = new BufferedReader(fileReader);
  log.debug("Encoding for " + foFile + ": " + fileReader.getEncoding());

Again, this prints "Encoding for /tmp/quarterly40215.xml: ASCII". At
this point, the reader is used to read the file into a byte array.
Then it is wrapped in a ByteArrayInput stream and fed to the FOP
Driver. Are we any closer?


On 11/25/05, Craig McDaniel <cp...@gmail.com> wrote:
> On 11/25/05, Andreas L Delmelle <a_...@pandora.be> wrote:
> > On Nov 25, 2005, at 22:14, Craig McDaniel wrote:
> >
> > > I am trying to debug a PDF rendering for a client where non-breaking
> > > spaces are comming out as double question marks "??". FOP is being
> > > called from a servlet. I have tried using the fop command line tool
> > > and can not reproduce the problem. I have written an simple servlet on
> > > another system that functionally does the same thing, and can not
> > > reproduce the problem here either.
> > >
> > > Any ideas what could cause this? Is it some kind of character encoding
> > > issue?
> >
> > Indeed. The question-marks are most likely related to:
> > http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/
> > CharsetEncoder.html
> >
> > > The entity &#x00a0; is being used. What should my next step be
> > > in debugging this?
> >
> > Firstly: are you still using FOP 0.20.5? If so, can you try out the
> > recent alpha release, and report if the problem still occurs?
>
> I am using 0.20.5. Unfortunately, I do not have access to deploy
> changes to the server at this time, so I am unable to test changes in
> the only environment where the problem is happening ;-(
>
> > If you can't (or are already using FOP 0.90alpha), I think the best
> > bet is to go looking for places --in the servlet code, I presume--
> > where an XML declaration is hard-coded as a String literal or where a
> > Charset is used that's different from the default (= UTF-8).
>
> The original data file has no XML declaration. The stylesheet has one,
> but does not have an encoding attribute. The &#x00a0; entities are in
> the XSL, by the way.
>
> I almost feel like I am debugging this thing blind. I do have the
> source code, but it is too spread out to post here. It might be worth
> pointing out that the XSL is applied to the XML data and sent to a
> ByteArrayOutputStream. The byte array is then stored and later passed
> into the FOP driver as a ByteArrayInputStream. Likewise, the output of
> the driver is written to a byte array and finally, it gets sent to the
> browser with response.getOutputStream().write(bytes). Not the way I
> would have done it. Anyway, like I said, I coded up a servlet just
> like this one and could not reproduce the problem in my own
> environment. Perhaps this is a default encoding problem.
>
> > HTH!
>
> Absolutely, thanks for your help!
>
> > Cheers,
> >
> > Andreas
>
>
> --
> Craig McDaniel
>


--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Nov 26, 2005, at 01:24, Craig McDaniel wrote:

> On 11/25/05, Andreas L Delmelle <a_...@pandora.be> wrote:
>> <snip />
>> Your culprit is very close by here, I suspect, although OutputStreams
>> don't have an encoding... If it were an OutputStreamWriter using the
>> default platform Charset, then the bug would definitely be here.
>> (Perhaps somewhere, a Writer is wrapped around the OutputStream?)
>
> No, but there is a Writer being used to write out the original XML
> data to a cache file (pre-XSL). No encoding is being specified here
> either, though.

You could try to supply one, force it to UTF-8. Could be that the  
Writer's Bytes are encoded according to the default platform  
encoding, yet afterwards interpreted as if it had written Unicode  
Bytes instead...


Cheers,

Andreas


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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
On 11/25/05, Andreas L Delmelle <a_...@pandora.be> wrote:
> On Nov 25, 2005, at 22:46, Craig McDaniel wrote:
> > Likewise, the output of the driver is written to a byte array and
> > finally, it gets sent to the browser with
> > response.getOutputStream().write(bytes).
>
> Your culprit is very close by here, I suspect, although OutputStreams
> don't have an encoding... If it were an OutputStreamWriter using the
> default platform Charset, then the bug would definitely be here.
> (Perhaps somewhere, a Writer is wrapped around the OutputStream?)

No, but there is a Writer being used to write out the original XML
data to a cache file (pre-XSL). No encoding is being specified here
either, though.

--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Nov 25, 2005, at 22:46, Craig McDaniel wrote:

Hi,

<snip />
> The original data file has no XML declaration. The stylesheet has one,
> but does not have an encoding attribute. The &#x00a0; entities are in
> the XSL, by the way.

OK, no explicit encoding attribute makes both UTF-8 encoded...

> I almost feel like I am debugging this thing blind. I do have the
> source code, but it is too spread out to post here. It might be worth
> pointing out that the XSL is applied to the XML data and sent to a
> ByteArrayOutputStream. The byte array is then stored and later passed
> into the FOP driver as a ByteArrayInputStream.

Still no problem here, as ByteArray*Streams are encoding-agnostic. A  
Byte is a Byte...

> Likewise, the output of the driver is written to a byte array and
> finally, it gets sent to the browser with
> response.getOutputStream().write(bytes).

Your culprit is very close by here, I suspect, although OutputStreams  
don't have an encoding... If it were an OutputStreamWriter using the  
default platform Charset, then the bug would definitely be here.  
(Perhaps somewhere, a Writer is wrapped around the OutputStream?)


HTH!

Cheers,

Andreas



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


Re: Non-breaking space turning into "??"

Posted by Craig McDaniel <cp...@gmail.com>.
On 11/25/05, Andreas L Delmelle <a_...@pandora.be> wrote:
> On Nov 25, 2005, at 22:14, Craig McDaniel wrote:
>
> > I am trying to debug a PDF rendering for a client where non-breaking
> > spaces are comming out as double question marks "??". FOP is being
> > called from a servlet. I have tried using the fop command line tool
> > and can not reproduce the problem. I have written an simple servlet on
> > another system that functionally does the same thing, and can not
> > reproduce the problem here either.
> >
> > Any ideas what could cause this? Is it some kind of character encoding
> > issue?
>
> Indeed. The question-marks are most likely related to:
> http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/
> CharsetEncoder.html
>
> > The entity &#x00a0; is being used. What should my next step be
> > in debugging this?
>
> Firstly: are you still using FOP 0.20.5? If so, can you try out the
> recent alpha release, and report if the problem still occurs?

I am using 0.20.5. Unfortunately, I do not have access to deploy
changes to the server at this time, so I am unable to test changes in
the only environment where the problem is happening ;-(

> If you can't (or are already using FOP 0.90alpha), I think the best
> bet is to go looking for places --in the servlet code, I presume--
> where an XML declaration is hard-coded as a String literal or where a
> Charset is used that's different from the default (= UTF-8).

The original data file has no XML declaration. The stylesheet has one,
but does not have an encoding attribute. The &#x00a0; entities are in
the XSL, by the way.

I almost feel like I am debugging this thing blind. I do have the
source code, but it is too spread out to post here. It might be worth
pointing out that the XSL is applied to the XML data and sent to a
ByteArrayOutputStream. The byte array is then stored and later passed
into the FOP driver as a ByteArrayInputStream. Likewise, the output of
the driver is written to a byte array and finally, it gets sent to the
browser with response.getOutputStream().write(bytes). Not the way I
would have done it. Anyway, like I said, I coded up a servlet just
like this one and could not reproduce the problem in my own
environment. Perhaps this is a default encoding problem.

> HTH!

Absolutely, thanks for your help!

> Cheers,
>
> Andreas


--
Craig McDaniel

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


Re: Non-breaking space turning into "??"

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Nov 25, 2005, at 22:14, Craig McDaniel wrote:

> I am trying to debug a PDF rendering for a client where non-breaking
> spaces are comming out as double question marks "??". FOP is being
> called from a servlet. I have tried using the fop command line tool
> and can not reproduce the problem. I have written an simple servlet on
> another system that functionally does the same thing, and can not
> reproduce the problem here either.
>
> Any ideas what could cause this? Is it some kind of character encoding
> issue?

Indeed. The question-marks are most likely related to:
http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/ 
CharsetEncoder.html

> The entity &#x00a0; is being used. What should my next step be
> in debugging this?

Firstly: are you still using FOP 0.20.5? If so, can you try out the  
recent alpha release, and report if the problem still occurs?

If you can't (or are already using FOP 0.90alpha), I think the best  
bet is to go looking for places --in the servlet code, I presume--  
where an XML declaration is hard-coded as a String literal or where a  
Charset is used that's different from the default (= UTF-8).
I remember once tracking down a similar error in the FOP 0.20.5  
SVGRenderer, and stumbling upon a literal XML declaration that  
indicated the file was going to be ISO-8859-1 encoded, while all  
output was in fact UTF-8...


HTH!

Cheers,

Andreas


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