diff --git a/src/EDI/Encoder.php b/src/EDI/Encoder.php index c61b43de..696edc45 100644 --- a/src/EDI/Encoder.php +++ b/src/EDI/Encoder.php @@ -1,7 +1,7 @@ originalArray = $arr; + $this->wrap = $wrap; + $edistring = ''; $count = count($arr); $k = 0; @@ -117,12 +120,16 @@ private function escapeValue($str) public function get() { if ($this->UNAActive) { - return "UNA" . $this->sepComp . + $una = "UNA" . $this->sepComp . $this->sepData . $this->sepDec . $this->symbRel . $this->symbRep . - $this->symbEnd . $this->output; + $this->symbEnd ; + if ($this->wrap === false) { + $una .= "\n"; + } + return $una . $this->output; } else { return $this->output; }