XML-SAX failed with error code 6
Posted: Tue Mar 25, 2025 7:47 am
Yesterday I had an RPG-program where the XML-SAX command failed with error code 6.
After googling what this means, I found out that the cause was a character that couldn't
be converted from UTF-8 to EBCDIC. I think it was the "hat" ^
character that somebody had hit accidently.
This program is based on an article from Scott Klement in SystemINetwork from 14th May 2009
about XML-SAX. So it is fairly old.
xml-sax %handler(xmlHandler: ignoreMe) %XML(%trim( pFromstmf ) : 'doc=file');
My question is - is it possible to add code, so it replaces an invalid character with a blank
so I don't get an error?
Kind regards
Peder
After googling what this means, I found out that the cause was a character that couldn't
be converted from UTF-8 to EBCDIC. I think it was the "hat" ^
character that somebody had hit accidently.
This program is based on an article from Scott Klement in SystemINetwork from 14th May 2009
about XML-SAX. So it is fairly old.
xml-sax %handler(xmlHandler: ignoreMe) %XML(%trim( pFromstmf ) : 'doc=file');
My question is - is it possible to add code, so it replaces an invalid character with a blank
so I don't get an error?
Kind regards
Peder