Skip to content

Bug or not, when using xmltoolkit/xmlservice with invalid characters in IBM i database field #178

@ChriMech

Description

@ChriMech

I am using php xmltoolkit with xmlservice to fetch text from an ibm i database file through a call to an RPG programm. Everything works fine, unless the character database field contains "invalid" characters below EBCDIC x'40' (i.e x'3F'). This surely should not be, but somehow the database has thousands of records with one or more of this non-text characters within a text field, which should include an article description.

When the RPG Program call fetches such a text field through an RPG program parameter, i get this :
Warning: simplexml_load_string(): Entity: line 36: parser error : CData section not finished Articl in /QOpenSys/pkgs/share/zendphp/libraries/xmltoolkit/1.8.5/ToolkitServiceXML.php on line 807
Warning: simplexml_load_string(): <data var='TEXT' type='50a' ><![CDATA[Article �« description]]></data> in /QOpenSys/pkgs/share/zendphp/libraries/xmltoolkit/1.8.5/ToolkitServiceXML.php on line 807
Warning: simplexml_load_string(): ^ in /QOpenSys/pkgs/share/zendphp/libraries/xmltoolkit/1.8.5/ToolkitServiceXML.php on line 807
Warning: simplexml_load_string(): Entity: line 36: parser error : PCDATA invalid Char value 26 in /QOpenSys/pkgs/share/zendphp/libraries/xmltoolkit/1.8.5/ToolkitServiceXML.php on line 807

The invalid characters show as �«

My question: Is this a bug in xmlservice or ToolkitServiceXML.php or do you have any suggestions, on how i should deal with the situation?
Thank you very much,
Christian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions