[jdom-interest] Dealing with binary characters in-memory -> outputter

Jason Hunter jhunter at acm.org
Tue Sep 25 10:31:22 PDT 2001


I'm explaining how it's supposed to work.  It's possible reality doesn't
quite match.  Do you want to send in the little test case?

-jh-

Mark Bennett wrote:
> 
> I'm sorry to be so dense but I don't think this works.
> 
> That character is not escaped but it DOES generate
> an error when you read the file back in.  There was
> another illegal byte that it output that it wouldn't
> read back in as well (I forget what).
> 
> -----Original Message-----
> From: Jason Hunter [mailto:jhunter at collab.net]
> Sent: Monday, September 24, 2001 3:53 PM
> To: mbennett at ideaeng.com
> Cc: Trimmer, Todd; jdom-interest at jdom.org; szegedia at freemail.hu
> Subject: Re: [jdom-interest] Dealing with binary characters in-memory ->
> outputter
> 
> 0xA9 is a legal char in UTF-8 so it's not escaping it.  (When I said "no
> encoding is necessary" I typod and should have said "no escaping".)  All
> chars are legal in UTF-8 so there's no need to escape standard chars.
> It doesn't look good in a Latin-1 viewer though, because 0xA9 will be
> two bytes in UTF-8.
> 
> -jh-
> 
> Mark Bennett wrote:
> >
> > Hello Jason,
> >
> > I don't quite follow what you're saying:
> >
> > "For UTF-8
> > encoding (the default) no encoding is necessary except for special
> > characters (ie <) which we take care of."
> >
> > This doesn't seem to be true?  I'm using the default and
> > special characters are not escaped (0xA9 in my example).
> >
> > Mark
> >
> > -----Original Message-----
> > From: Jason Hunter [mailto:jhunter at collab.net]
> > Sent: Monday, September 24, 2001 3:01 PM
> > To: Trimmer, Todd
> > Cc: 'jdom-interest at jdom.org'; 'szegedia at freemail.hu';
> > 'mbennett at ideaeng.com'
> > Subject: Re: [jdom-interest] Dealing with binary characters in-memory ->
> > outputter
> >
> > I like your proposed approach.  Our plan thus far has been: For UTF-8
> > encoding (the default) no encoding is necessary except for special
> > characters (ie <) which we take care of.  For other encodings you set,
> > you're responsible for handling things yourself.
> >
> > ....



More information about the jdom-interest mailing list