cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lai, Harry" <H...@coremetrics.com>
Subject [Possible Bug] TextSerializer loses characters with ASCII encodin g?
Date Tue, 02 Jul 2002 19:18:44 GMT
Hi folks,

I'm seeing some really odd behavior with serializers, and wanted to see if
anyone had seen this before (or better yet) knows what's causing this.  =)

PROBLEM:
If I set an XML, HTML, or Text serializer's encoding to ASCII, I end up
losing the tail end of my output (roughly 1-1000 characters).  I think it
has to do with the buffered output stream not being properly closed/flushed,
but I'm not sure.

ENVIRONMENT:
Cocoon 2.0.2 running on JBoss 2.4.5 with Tomcat 4.0.3.  Win2k.

WORKAROUNDS:
I can make this problem go away by doing either of the following:
  1. Change the encoding to UTF-8 or ISO-8859-1.
  2. Change the buffer-size to 1 (tried with values from 1-2048;
     was still seeing the problem with values as low as 10).

REPRODUCING THE BUG:
>From what I'm seeing, you can reproduce this bug by having a reasonably
large buffer (larger than 10 bytes) and switching any TextSerializer-based
serializer's encoding to ASCII.  Here's a sample from my sitemap:

	<map:serializer name="css" mime-type="text/css"
logger="sitemap.serializer.css"
                    src="org.apache.cocoon.serialization.TextSerializer"
                    pool-max="64" pool-min="16" pool-grow="4">
		<buffer-size>2048</buffer-size>
		<encoding>ASCII</encoding>
	</map:serializer>

Any thoughts, suggestions, ideas, etc. would be greatly appreciated.
Thanks!

Harry

PS  The main reason this comes up is for a dynamic css pipeline, which I'd
like to be character set agnostic (hence, the ASCII encoding).  I only
tested it with the HTML and XML serializer to make sure it wasn't something
specific to my css pipeline.

-------------- 
Harry Lai 
hlai@coremetrics.com 
512.682.1101 x2170 

---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message