edifact icon indicating copy to clipboard operation
edifact copied to clipboard

question marks are not parsed correctly

Open lhyx opened this issue 6 years ago • 5 comments
trafficstars

Hi,

Question marks should be added as ?? because it's an escape character.

In this example the question marks escape the ' and this should not happen:

ATT+1400+??????'
XRH+3'
$c = new \EDI\Parser();
$c->setStripRegex('//');
$c->loadString($edistring);
$message       = $c->get();

$message contains this:

[99] => Array
        (
            [0] => ATT
            [1] => 1400
            [2] => ???'XRH
            [3] => 3
        )

As you can see the question marks are correctly parsed into ??? but the ' is still escaped and this is not correct.

Any idea how this could be fixed ?

lhyx avatar Dec 27 '18 15:12 lhyx

Are you using the latest version? Could you try with some previous tag?

sabas avatar Dec 29 '18 14:12 sabas

Hi,

I tried version 3.4 and then the ?????? is even not converted in ???. At the moment I'm using the last version (4.0).

lhyx avatar Dec 31 '18 08:12 lhyx

Is this related to #65?

tophsic avatar Jan 10 '19 08:01 tophsic

Hi,

I checked the issue before posting. But in the case of 6 question marks the issue still seems to occur. I'm using the latest version 4.0.

lhyx avatar Jan 11 '19 09:01 lhyx

Ow I see you released a fix some time ago to solve some of the question mark situations. So it seems in the case of 6 question marks the problem still occurs for some reason.

lhyx avatar Jan 11 '19 09:01 lhyx