You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Yen Trinh <yt...@interlog.com> on 2000/06/08 23:36:47 UTC
CRLF and SAXParseException
1. CRLF
I got fatal error when parsing memory buffer: Expected whitespace
<?xml version="1.0"?>CRLF<personal></personal>
I didnot get complaint with this:
<?xml version="1.0" encoding="IBM037-S390"?>CRLF<personal></personal>
2. How do I catch SAXParseException for error, fatalError and warning in
HandlerBase?
Thanks,
Yen
Re: CRLF and SAXParseException
Posted by Dean Roddey <dr...@charmedquark.com>.
Then that's the problem. If you don't give an encoding, then its assumed to
be UTF-18 (unless there is a BOM in which case its UTF-16.) This is by the
XML spec. If you want to write EBCDIC files, you must give an encoding.
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"You young, and you gotcha health. Whatchoo wanna job fer?"
----- Original Message -----
From: "Yen Trinh" <yt...@interlog.com>
To: <xe...@xml.apache.org>
Sent: Monday, June 12, 2000 10:12 AM
Subject: Re: CRLF and SAXParseException
>
> 1. The error message is
> Fatal Error at (file prodInfo, line 1, char 20): Expected whitespace
> I run a REXX program on S390 TSO. It's in EBCDIC, and CR=\x0D, LF=\x15
>
> 2. I got the error from fatalError, but could not catch it in the main
> function. Is there a way to catch ALL error/exception from the main
> function?
>
SAXParseException
Posted by Yen Trinh <yt...@interlog.com>.
2. I got the fatalError from my error Handler which was not detected by
XMLException.
try
{
parser.parse(*memBufIS); // return void
}
catch (const XMLException& e)
{
cerr << "\nError during parsing memory stream:\n"
<< "Exception message is: \n"
<< StrX(e.getMessage()) << "\n" << endl;
return -1;
}
Is there a way to catch ALL error/exception in the main function?
Thanks,
Yen
Mike Pogue wrote:
>
> Yen Trinh wrote:
> >
> > 1. The error message is
> > Fatal Error at (file prodInfo, line 1, char 20): Expected whitespace
> > I run a REXX program on S390 TSO. It's in EBCDIC, and CR=\x0D, LF=\x15
>
> If an encoding is not specified, UTF-8 is assumed.
> So, when you specified the encoding, the error went away. This is the
> way it's supposed to work....
>
>
> > 2. I got the error from fatalError, but could not catch it in the main
> > function. Is there a way to catch ALL error/exception from the main
> > function?
> >
> > Thanks for taking the time looking the problem,
> > Yen
> >
> > Dean Roddey wrote:
> > >
> > > Can you give the actual errors, with the line/col info? And, can you explain
> > > exactly what you are trying to represent by CRLF? What actual binary values
> > > are these? Are they EBCDIC, ASCII, etc...?
> > >
> > > --------------------------
> > > Dean Roddey
> > > The CIDLib Class Libraries
> > > Charmed Quark Software
> > > droddey@charmedquark.com
> > > http://www.charmedquark.com
> > >
> > > "Give me immortality, or give me death"
> > >
> > > ----- Original Message -----
> > > From: "Yen Trinh" <yt...@interlog.com>
> > > To: <xe...@xml.apache.org>
> > > Sent: Thursday, June 08, 2000 2:36 PM
> > > Subject: CRLF and SAXParseException
> > >
> > > > 1. CRLF
> > > > I got fatal error when parsing memory buffer: Expected whitespace
> > > > <?xml version="1.0"?>CRLF<personal></personal>
> > > >
> > > > I didnot get complaint with this:
> > > > <?xml version="1.0" encoding="IBM037-S390"?>CRLF<personal></personal>
> > > >
> > > > 2. How do I catch SAXParseException for error, fatalError and warning in
> > > > HandlerBase?
> > > >
> > > > Thanks,
> > > > Yen
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: CRLF and SAXParseException
Posted by Mike Pogue <mp...@apache.org>.
Yen Trinh wrote:
>
> 1. The error message is
> Fatal Error at (file prodInfo, line 1, char 20): Expected whitespace
> I run a REXX program on S390 TSO. It's in EBCDIC, and CR=\x0D, LF=\x15
If an encoding is not specified, UTF-8 is assumed.
So, when you specified the encoding, the error went away. This is the
way it's supposed to work....
> 2. I got the error from fatalError, but could not catch it in the main
> function. Is there a way to catch ALL error/exception from the main
> function?
>
> Thanks for taking the time looking the problem,
> Yen
>
> Dean Roddey wrote:
> >
> > Can you give the actual errors, with the line/col info? And, can you explain
> > exactly what you are trying to represent by CRLF? What actual binary values
> > are these? Are they EBCDIC, ASCII, etc...?
> >
> > --------------------------
> > Dean Roddey
> > The CIDLib Class Libraries
> > Charmed Quark Software
> > droddey@charmedquark.com
> > http://www.charmedquark.com
> >
> > "Give me immortality, or give me death"
> >
> > ----- Original Message -----
> > From: "Yen Trinh" <yt...@interlog.com>
> > To: <xe...@xml.apache.org>
> > Sent: Thursday, June 08, 2000 2:36 PM
> > Subject: CRLF and SAXParseException
> >
> > > 1. CRLF
> > > I got fatal error when parsing memory buffer: Expected whitespace
> > > <?xml version="1.0"?>CRLF<personal></personal>
> > >
> > > I didnot get complaint with this:
> > > <?xml version="1.0" encoding="IBM037-S390"?>CRLF<personal></personal>
> > >
> > > 2. How do I catch SAXParseException for error, fatalError and warning in
> > > HandlerBase?
> > >
> > > Thanks,
> > > Yen
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: CRLF and SAXParseException
Posted by Yen Trinh <yt...@interlog.com>.
1. The error message is
Fatal Error at (file prodInfo, line 1, char 20): Expected whitespace
I run a REXX program on S390 TSO. It's in EBCDIC, and CR=\x0D, LF=\x15
2. I got the error from fatalError, but could not catch it in the main
function. Is there a way to catch ALL error/exception from the main
function?
Thanks for taking the time looking the problem,
Yen
Dean Roddey wrote:
>
> Can you give the actual errors, with the line/col info? And, can you explain
> exactly what you are trying to represent by CRLF? What actual binary values
> are these? Are they EBCDIC, ASCII, etc...?
>
> --------------------------
> Dean Roddey
> The CIDLib Class Libraries
> Charmed Quark Software
> droddey@charmedquark.com
> http://www.charmedquark.com
>
> "Give me immortality, or give me death"
>
> ----- Original Message -----
> From: "Yen Trinh" <yt...@interlog.com>
> To: <xe...@xml.apache.org>
> Sent: Thursday, June 08, 2000 2:36 PM
> Subject: CRLF and SAXParseException
>
> > 1. CRLF
> > I got fatal error when parsing memory buffer: Expected whitespace
> > <?xml version="1.0"?>CRLF<personal></personal>
> >
> > I didnot get complaint with this:
> > <?xml version="1.0" encoding="IBM037-S390"?>CRLF<personal></personal>
> >
> > 2. How do I catch SAXParseException for error, fatalError and warning in
> > HandlerBase?
> >
> > Thanks,
> > Yen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: CRLF and SAXParseException
Posted by Dean Roddey <dr...@charmedquark.com>.
Can you give the actual errors, with the line/col info? And, can you explain
exactly what you are trying to represent by CRLF? What actual binary values
are these? Are they EBCDIC, ASCII, etc...?
--------------------------
Dean Roddey
The CIDLib Class Libraries
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"Give me immortality, or give me death"
----- Original Message -----
From: "Yen Trinh" <yt...@interlog.com>
To: <xe...@xml.apache.org>
Sent: Thursday, June 08, 2000 2:36 PM
Subject: CRLF and SAXParseException
> 1. CRLF
> I got fatal error when parsing memory buffer: Expected whitespace
> <?xml version="1.0"?>CRLF<personal></personal>
>
> I didnot get complaint with this:
> <?xml version="1.0" encoding="IBM037-S390"?>CRLF<personal></personal>
>
> 2. How do I catch SAXParseException for error, fatalError and warning in
> HandlerBase?
>
> Thanks,
> Yen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>