Re: 1.4.2 Release Candidate Available

"Robert Lowe" <[email protected]> Wed, 7 May 2003 01:15:12 +0800
Newsgroups gmane.comp.jakarta.ecs.user
Message-ID <[email protected]>
Abre,

Have you considered bypassing the output(java.io.OutputStream) method, and
using the output(java.io.PrintWriter) overloading instead? That way you get
compete control of the encoding.

PrintWriter pw = new PrintWriter(new OutputStreamWriter(myOutputStream,
"UTF-8"));
myElement.output(pw);
pw.flush();

In fact, I'm surprised that output(java.io.OutputStream) isn't implemented
that way internally, by delegating to output(java.io.PrintWriter), something
like:

public void output(OutputStream out) {
    PrintWriter pw = new PrintWriter(new OutputStreamWriter(out,
getCodeSet()));
    output(pw);
    pw.flush();
}

At the moment, there seems to be a lot of duplication in the two output
methods, which the above implementation would avoid.

Actually, I'm a little curious about why each element has its own codeSet
property. It's not as if you'd ever want to specify different code sets for
different elements in a tree--at least, I can't think of any use for that.

- Rob


----- Original Message ----- 
From: "robert burrell donkin" <[email protected]>
To: "ECS Users List" <[email protected]>
Sent: Tuesday, May 06, 2003 5:33 PM
Subject: Re: 1.4.2 Release Candidate Available


> hi Abre
>
> the patch made it through this time :)
>
> i think that the patch you supplied breaks backwards compatibility and
> therefore inclusion in this release isn't really appropriate. i think that
> i do understand the problem and have an idea how it can be solved without
> breaking backwards compatibility. rather than passing in an encoding,
> getEncoding() should be used (in a similar way to the GenericElement
> method).
>
> since this is a change to a fundamental method very late in the release
> cycle, i'm reluctant to make this change unless it can be verified that it
> solves the problem you've reported and also that it can be verified that
> it does not introduce any problems with existing code (since it's a
> symantic change - it would change the method using the default encoding
> for the platform to the encoding specified by ECS). in other words, i'd
> need volunteers to test it confirm that this change works ok. any
> volunteers?
>
> - robert
>
> On Monday, May 5, 2003, at 10:38 PM, Abre Chase wrote:
>
> > Robert,
> >
> > I've looked through some of the source in CVS and would like to bring
> > something to your attention.  I posted a message to the list a few
months
> > ago about this.  I never received a reply, but after doing some
searching
> > I found that you did reply to the original post.
> >
> > To summarize the problem quickly, ConcreteElement does not properly
> > encode strings written to the OutputStream in the output method.
> >
> > For reference, here's a link to the original post:
> >
> >
http://www.servlets.com/archive/servlet/ReadMsg?msgId=334418&listName=ecs-user
> >
> > I've attached a zip file which contains the patched source for
> > ConcreteElement as well as the output from a cvs -diff -u.
> >
> > Please provide some feedback when you have time.
> >
> > Thanks again and keep up the good work!
> >
> > - Abre Chase
> >
> >
> > -----Original Message-----
> > From: robert burrell donkin
> > [mailto:[email protected]]
> > Sent: Monday, May 05, 2003 4:43 PM
> > To: ECS Users List
> > Subject: Re: 1.4.2 Release Candidate Available
> >
> >
> > there's the changelog in CVS.
> >
> > ECS has been very stable for some time. this release is just about
> > wrapping up the bug fixes in a formal release for those people who need
to
> > use an official release.
> >
> > if there is demand, i will go through and create more detailed release
> > notes from the CVS logs. this is a bit of a chore so it's up to you
people
> > out there to let me now if you want this done.
> >
> > - robert
> >
> > On Monday, May 5, 2003, at 07:03 PM, Abre Chase wrote:
> >
> >> Robert -
> >>
> >> Is there an updated changelog for 1.4.2?
> >>
> >> - Abre Chase
> >>
> >> -----Original Message-----
> >> From: robert burrell donkin
> >> [mailto:[email protected]]
> >> Sent: Saturday, May 03, 2003 5:35 AM
> >> To: [email protected]; [email protected]
> >> Subject: 1.4.2 Release Candidate Available
> >>
> >>
> >> 1.4.2 is being created in response to a request for a formal release
> >> containing the (small but important) number of bugs fixes since the
1.4.
> >> 1
> >> release. i've created a release candidate which can be downloaded from
> >> http://cvs.apache.org/~rdonkin/ecs/. i'd be very grateful if users
could
> >> test this release candidate and report back any problems (or indeed
that
> >> it works fine :).
> >>
> >> it's in a new binary distribution format - just the javadocs, the jar
and
> >> the LICENSE. for the full release i will be creating source
distributions
> >> which will match the existing distribution format in addition to these
> >> binary distributions.
> >>
> >> - robert
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >  ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>