You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Gianugo Rabellino <gi...@rabellino.it> on 2002/01/06 15:52:31 UTC
[FIXED!] Re: Where did my encoding go?
Tom Bradford wrote:
> On Friday, January 4, 2002, at 10:16 AM, Gianugo Rabellino wrote:
>> But actually I even don't understand what this small encoding issue
>> might have to do when the only things flowing around should be SAX
>> events as it is in Cocoon where only getContentAsSAX() is called.
>> Isn't it weird?
> Can you send me one of the offending documents? I'll play around and
> see what I can figure out.
Tom,
I managed to find out the problem: in SAXEventGenerator.java the "value"
String is built from a byte array. The problem is that there is no
encoding specification in the constructor, which means (as per the Java
APIdocs) that some issue might arise. The attached one-liner patch fixes
the problem, but it's a workaround that works only now, since UTF-8 is
the only supported encoding. Once multiple encodings will be supported
this will have to be changed.
I hope this patch (or something equivalent) can make into the CVS: it's
really important (to me in the first place :)) and to everyone that will
use XIndice with Cocoon, given that SAX is used all over the place.
Thanks for your support,
--
Gianugo
Re: [FIXED!] Re: Where did my encoding go?
Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Sunday, January 6, 2002, at 07:52 AM, Gianugo Rabellino wrote:
> I managed to find out the problem: in SAXEventGenerator.java the
> "value" String is built from a byte array. The problem is that there is
> no encoding specification in the constructor, which means (as per the
> Java APIdocs) that some issue might arise. The attached one-liner patch
> fixes the problem, but it's a workaround that works only now, since
> UTF-8 is the only supported encoding. Once multiple encodings will be
> supported this will have to be changed.
>
> I hope this patch (or something equivalent) can make into the CVS: it's
> really important (to me in the first place :)) and to everyone that
> will use XIndice with Cocoon, given that SAX is used all over the place.
Just added it to the CVS repository. Thanks!
--
Tom Bradford - http://www.tbradford.org
Developer - Apache Xindice (Native XML Database)
Creator - Project Labrador (XML Object Broker)